config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/mailbox.pyo

hRc!@sdZddkZddkZddkZddkZddkZddkZddkZddkZddk	Zddk
ZddkZddkZy*ei
djo
enddkZWnej
o
eZnXdddddd	d
ddd
dddddddgZdfdYZdefdYZdefdYZdefdYZdefdYZd	efdYZdefdYZdefdYZd
eiifdYZdefd YZd!efd"YZdefd#YZd
efd$YZdefd%YZdefd&YZ d'fd(YZ!d)e!fd*YZ"e#d+Z$d,Z%d-Z&d.Z'd/Z(d0Z)d1fd2YZ*de*fd3YZ+de+fd4YZ,de*fd5YZ-dfd6YZ.de*fd7YZ/d8e0fd9YZ1d:e1fd;YZ2d<e1fd=YZ3d>e1fd?YZ4d@e1fdAYZ5dS(BsDRead/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.iNtos2emxtMailboxtMaildirtmboxtMHtBabyltMMDFtMessagetMaildirMessagetmboxMessaget	MHMessagetBabylMessagetMMDFMessagetUnixMailboxtPortableUnixMailboxtMmdfMailboxt	MHMailboxtBabylMailboxcBs.eZdZdedZdZdZdZdZ	dZ
ddZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZdZdZddZdZddZdZdZdZ dZ!e"dZ#RS( s*A group of messages in a particular place.cCs.tiitii||_||_dS(sInitialize a Mailbox instance.N(tostpathtabspatht
expandusert_patht_factory(tselfRtfactorytcreate((s#/usr/local/lib/python2.5/mailbox.pyt__init__'s!cCstddS(s$Add message and return assigned key.s&Method must be implemented by subclassN(tNotImplementedError(Rtmessage((s#/usr/local/lib/python2.5/mailbox.pytadd,scCstddS(s=Remove the keyed message; raise KeyError if it doesn't exist.s&Method must be implemented by subclassN(R(Rtkey((s#/usr/local/lib/python2.5/mailbox.pytremove0scCs|i|dS(N(R (RR((s#/usr/local/lib/python2.5/mailbox.pyt__delitem__4scCs+y|i|Wntj
onXdS(s'If the keyed message exists, remove it.N(R tKeyError(RR((s#/usr/local/lib/python2.5/mailbox.pytdiscard7scCstddS(s>Replace the keyed message; raise KeyError if it doesn't exist.s&Method must be implemented by subclassN(R(RRR((s#/usr/local/lib/python2.5/mailbox.pyt__setitem__>scCs/y|i|SWntj
o|SnXdS(s9Return the keyed message, or default if it doesn't exist.N(t__getitem__R"(RRtdefault((s#/usr/local/lib/python2.5/mailbox.pytgetBscCs5|ip|i|Sn|i|i|SdS(s=Return the keyed message; raise KeyError if it doesn't exist.N(Rtget_messagetget_file(RR((s#/usr/local/lib/python2.5/mailbox.pyR%Is
cCstddS(s4Return a Message representation or raise a KeyError.s&Method must be implemented by subclassN(R(RR((s#/usr/local/lib/python2.5/mailbox.pyR(PscCstddS(s3Return a string representation or raise a KeyError.s&Method must be implemented by subclassN(R(RR((s#/usr/local/lib/python2.5/mailbox.pyt
get_stringTscCstddS(s6Return a file-like representation or raise a KeyError.s&Method must be implemented by subclassN(R(RR((s#/usr/local/lib/python2.5/mailbox.pyR)XscCstddS(sReturn an iterator over keys.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.5/mailbox.pytiterkeys\scCst|iS(sReturn a list of keys.(tlistR+(R((s#/usr/local/lib/python2.5/mailbox.pytkeys`sccsGx@|iD]2}y||}Wntj
o
q
nX|Vq
WdS(s%Return an iterator over all messages.N(R+R"(RRtvalue((s#/usr/local/lib/python2.5/mailbox.pyt
itervaluesds
cCs
|iS(N(R/(R((s#/usr/local/lib/python2.5/mailbox.pyt__iter__mscCst|iS(s,Return a list of messages. Memory intensive.(R,R/(R((s#/usr/local/lib/python2.5/mailbox.pytvaluespsccsMxF|iD]8}y||}Wntj
o
q
nX||fVq
WdS(s.Return an iterator over (key, message) tuples.N(R+R"(RRR.((s#/usr/local/lib/python2.5/mailbox.pyt	iteritemsts
cCst|iS(s9Return a list of (key, message) tuples. Memory intensive.(R,R2(R((s#/usr/local/lib/python2.5/mailbox.pytitems}scCstddS(s9Return True if the keyed message exists, False otherwise.s&Method must be implemented by subclassN(R(RR((s#/usr/local/lib/python2.5/mailbox.pythas_keyscCs
|i|S(N(R4(RR((s#/usr/local/lib/python2.5/mailbox.pyt__contains__scCstddS(s*Return a count of messages in the mailbox.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.5/mailbox.pyt__len__scCs(x!|iD]}|i|q
WdS(sDelete all messages.N(R+R#(RR((s#/usr/local/lib/python2.5/mailbox.pytclears
cCs9y||}Wntj
o|SnX|i||S(s3Delete the keyed message and return it, or default.(R"R#(RRR&tresult((s#/usr/local/lib/python2.5/mailbox.pytpops	
cCs:x3|iD]}||i|fSq
WtddS(s6Delete an arbitrary (key, message) pair and return it.sNo messages in mailboxN(R+R9R"(RR((s#/usr/local/lib/python2.5/mailbox.pytpopitems
cCst|do|i}n't|do|i}n|}t}x>|D]6\}}y|||<WqStj
o
t}qSXqSW|otdndS(s4Change the messages that correspond to certain keys.R2R3sNo message with key(s)N(thasattrR2R3tFalseR"tTrue(Rtargtsourcetbad_keyRR((s#/usr/local/lib/python2.5/mailbox.pytupdatescCstddS(s&Write any pending changes to the disk.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.5/mailbox.pytflushscCstddS(sLock the mailbox.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.5/mailbox.pytlockscCstddS(s#Unlock the mailbox if it is locked.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.5/mailbox.pytunlockscCstddS(sFlush and close the mailbox.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.5/mailbox.pytclosescCsst|tiiodti}tii||d}|i||id|i|ii	dt
int|toC|o|i	dd}n|i	dt
i}|i|nt
|do|xtom|i}|djoPn|o"|idod|d	}n|i	dt
i}|i|qWntd
t|dS(s%Dump message contents to target file.is
s
From s
>From treadtsFrom s>From isInvalid message type: %sN(t
isinstancetemailRtStringIOt	GeneratortflattentseektwriteRFtreplaceRtlineseptstrR;R=treadlinet
startswitht	TypeErrorttype(RRttargettmangle_from_tbuffertgentline((s#/usr/local/lib/python2.5/mailbox.pyt
_dump_messages,

&
N($t__name__t
__module__t__doc__tNoneR=RRR R!R#R$R'R%R(R*R)R+R-R/R0R1R2R3R4R5R6R7R9R:RARBRCRDRER<R[(((s#/usr/local/lib/python2.5/mailbox.pyR$s>																												cBseZdZdZeiedZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(sA qmail-style Maildir mailbox.t:cCsti||||tii|ip|o}ti|idtitii|iddtitii|iddtitii|iddqt|inh|_	dS(sInitialize a Maildir instance.ittmptnewtcurN(
RRRRtexistsRtmkdirtjointNoSuchMailboxErrort_toc(RtdirnameRR((s#/usr/local/lib/python2.5/mailbox.pyRs""&c
Cs|i}z|i||Wdt|Xt|to=|i}|i|i}||ijo
d}qn
d}d}ti	i
|ii|id}ti	i
|i|||}yNttdo'ti|i|ti|inti|i|WnOtj
oC}ti|i|itijotd|qknXt|to,ti|ti	i||ifn|S(s$Add message and return assigned key.NRGRbitlinks$Name clash with existing message: %s(t_create_tmpR[t_sync_closeRHRt
get_subdirtcolontget_infoRRtbasenametnametsplitRfRR;RjR trenametOSErrorterrnotEEXISTtExternalClashErrortutimetgetatimetget_date(RRttmp_filetsubdirtsuffixtuniqtdestte((s#/usr/local/lib/python2.5/mailbox.pyRs6%,cCs,titii|i|i|dS(s=Remove the keyed message; raise KeyError if it doesn't exist.N(RR RRfRt_lookup(RR((s#/usr/local/lib/python2.5/mailbox.pyR scCsYy|i|WnAtj
on0tj
o#}|itijoqUnXdS(s'If the keyed message exists, remove it.N(R R"RtRutENOENT(RRR((s#/usr/local/lib/python2.5/mailbox.pyR#sc
Cs$|i|}|i|}|i|}t|to
|}n|}tii|}|i|jo!|i|i|id}nd}|i	|tii
|i|||}	titii
|i||	t|to,ti
|	tii|	|ifndS(s>Replace the keyed message; raise KeyError if it doesn't exist.iRGN(RRRHRRRRiRnRrR#RfRRsRxRyRz(
RRRtold_subpathttemp_keyttemp_subpathtdominant_subpathR|R}tnew_path((s#/usr/local/lib/python2.5/mailbox.pyR$"s 
!
"cCs|i|}ttii|i|d}z-|io|i|}n
t|}Wd|iXtii	|\}}|i
||i|jo!|i|i	|idn|i
tiitii|i||S(s4Return a Message representation or raise a KeyError.trNi(RtopenRRRfRRRRERrt
set_subdirRntset_infotset_datetgetmtime(RRtsubpathtftmsgR|Rq((s#/usr/local/lib/python2.5/mailbox.pyR(9s!

!+cCsJttii|i|i|d}z|iSWd|iXdS(s3Return a string representation or raise a KeyError.RN(RRRRfRRRFRE(RRR((s#/usr/local/lib/python2.5/mailbox.pyR*Ks*cCs4ttii|i|i|d}t|S(s6Return a file-like representation or raise a KeyError.trb(RRRRfRRt
_ProxyFile(RRR((s#/usr/local/lib/python2.5/mailbox.pyR)Ss*ccsQ|ix@|iD]5}y|i|Wntj
o
qnX|VqWdS(sReturn an iterator over keys.N(t_refreshRhRR"(RR((s#/usr/local/lib/python2.5/mailbox.pyR+Xs

cCs|i||ijS(s9Return True if the keyed message exists, False otherwise.(RRh(RR((s#/usr/local/lib/python2.5/mailbox.pyR4bs
cCs|it|iS(s*Return a count of messages in the mailbox.(RtlenRh(R((s#/usr/local/lib/python2.5/mailbox.pyR6gs
cCsdS(s"Write any pending changes to disk.N((R((s#/usr/local/lib/python2.5/mailbox.pyRBlscCsdS(sLock the mailbox.N((R((s#/usr/local/lib/python2.5/mailbox.pyRCpscCsdS(s#Unlock the mailbox if it is locked.N((R((s#/usr/local/lib/python2.5/mailbox.pyRDtscCsdS(sFlush and close the mailbox.N((R((s#/usr/local/lib/python2.5/mailbox.pyRExscCsg}xxti|iD]d}t|djoK|ddjo:tiitii|i|o|i|dqqW|S(sReturn a list of folder names.iit.(RtlistdirRRRtisdirRftappend(RR8tentry((s#/usr/local/lib/python2.5/mailbox.pytlist_folders|s$%cCs/ttii|id|d|idtS(s/Return a Maildir instance for the named folder.RRR(RRRRfRRR<(Rtfolder((s#/usr/local/lib/python2.5/mailbox.pyt
get_folders	cCstii|id|}t|d|i}tii|d}tii|p'titi|ti	ti
Bn|S(s>Create a folder and return a Maildir instance representing it.RRt
maildirfolder(RRRfRRRRdRERtO_CREATtO_WRONLY(RRRR8tmaildirfolder_path((s#/usr/local/lib/python2.5/mailbox.pyt
add_folders'cCstii|id|}xztitii|dtitii|dD]>}t|djp|ddjotd|qWqWWxzti|D]i}|djoV|djoI|djo<tiitii||otd||fqqWxti|d	t	D]i\}}}x*|D]"}ti
tii||qBWx*|D]"}titii||qoWq,Wti|d
S(s-Delete the named folder, which must be empty.RRbRciisFolder contains message(s): %sRas%Folder contains subdirectory '%s': %sttopdownN(RRRfRRRt
NotEmptyErrorRtwalkR<R trmdir(RRRRtroottdirstfiles((s#/usr/local/lib/python2.5/mailbox.pyt
remove_folders*$'" $cCsti}xrtitii|idD]O}tii|id|}|tii|djoti|q.q.WdS(sDelete old files in "tmp".Rai@N(ttimeRRRRfRRyR (RtnowRR((s#/usr/local/lib/python2.5/mailbox.pytcleans"icCsUti}ti}d|jo|idd}nd|jo|idd}ndt|t|ddtiti|f}ti	i
|id|}yti|Wn~t
j
or}|itijoStid7_yt|SWq<t
j
o#}|itijoq5q<XqAnXtd	|d
S(s=Create a file in the tmp subdirectory and open and return it.t/s\057R`s\072s%s.M%sP%sQ%s.%sig.ARas&Name clash prevented file creation: %sN(RtsockettgethostnameROtintRtgetpidRt_countRRfRtstatRtRuRt_create_carefullyRvRw(RRthostnameR~RR((s#/usr/local/lib/python2.5/mailbox.pyRks,

&cCsh|_xdD]}tii|i|}xxti|D]g}tii||}tii|oq>n|i|id}tii|||i|<q>WqWdS(s!Update table of contents mapping.RbRciN(snewscur(	RhRRRfRRRRrRn(RR|tsubdir_pathRtpR~((s#/usr/local/lib/python2.5/mailbox.pyRs	cCsy?tiitii|i|i|o|i|SnWntj
onX|iy|i|SWn#tj
otd|nXdS(s=Use TOC to return subpath for given key, or raise a KeyError.sNo message with key: %sN(RRRdRfRRhR"R(RR((s#/usr/local/lib/python2.5/mailbox.pyRs,
cCszt|dp|i|_nxPtoHy||iiSWq&tj
odSq&tj
o
q&q&Xq&WdS(s0Return the next message in a one-time iteration.t
_onetime_keysN(R;R+RR=tnextt
StopIterationR_R"(R((s#/usr/local/lib/python2.5/mailbox.pyRs( R\R]R^Rntrfc822RR=RRR R#R$R(R*R)R+R4R6RBRCRDRERRRRRRRkRRR(((s#/usr/local/lib/python2.5/mailbox.pyRs6
	"							
																t_singlefileMailboxcBseZdZdedZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZddZdZRS(sA single-file mailbox.cCsti||||yt|id}Wntj
ox}|itijo0|ot|id}qt|iq|itijot|id}qnX||_	d|_d|_t
|_t
|_dS(s!Initialize a single-file mailbox.srb+swb+RiN(RRRRtIOErrorRuRRgtEACCESt_fileR_Rht	_next_keyR<t_pendingt_locked(RRRRRR((s#/usr/local/lib/python2.5/mailbox.pyRs 				cCsF|i|i||i|i<|id7_t|_|idS(s$Add message and return assigned key.i(Rt_append_messageRhRR=R(RR((s#/usr/local/lib/python2.5/mailbox.pyRs

	cCs$|i||i|=t|_dS(s=Remove the keyed message; raise KeyError if it doesn't exist.N(RRhR=R(RR((s#/usr/local/lib/python2.5/mailbox.pyR s

cCs0|i||i||i|<t|_dS(s>Replace the keyed message; raise KeyError if it doesn't exist.N(RRRhR=R(RRR((s#/usr/local/lib/python2.5/mailbox.pyR$s
ccs-|ix|iiD]}|VqWdS(sReturn an iterator over keys.N(RRhR-(RR((s#/usr/local/lib/python2.5/mailbox.pyR+ s
cCs|i||ijS(s9Return True if the keyed message exists, False otherwise.(RRh(RR((s#/usr/local/lib/python2.5/mailbox.pyR4&s
cCs|it|iS(s*Return a count of messages in the mailbox.(RRRh(R((s#/usr/local/lib/python2.5/mailbox.pyR6+s
cCs(|ipt|it|_ndS(sLock the mailbox.N(Rt
_lock_fileRR=(R((s#/usr/local/lib/python2.5/mailbox.pyRC0s

cCs(|iot|it|_ndS(s#Unlock the mailbox if it is locked.N(Rt_unlock_fileRR<(R((s#/usr/local/lib/python2.5/mailbox.pyRD6s

c	Cs6|ipdSn|it|i}yh}|i|xt|iiD]}|i|\}}|ii	||i
||i}xStoK|ii
td||ii}|djoPn|i|qW||if||<|i|qWWWn$|iti|inXt||iiyti|i|iWnxtj
ol}|itijp#tidjo=|itijo*ti|iti|i|iqnXt|id|_||_t|_|iot|idtndS(s"Write any pending changes to disk.NiRGtos2srb+tdotlock(RRt_create_temporaryRt_pre_mailbox_hooktsortedRhR-RRMt_pre_message_hookttellR=RFtminRNt_post_message_hookRERR RqRlRsRtRuRvRRR<RR(	Rtnew_filetnew_tocRtstarttstopt	new_startRXR((s#/usr/local/lib/python2.5/mailbox.pyRB<sR







#		
cCsdS(s,Called before writing the mailbox to file f.N((RR((s#/usr/local/lib/python2.5/mailbox.pyRhscCsdS(s-Called before writing each message to file f.N((RR((s#/usr/local/lib/python2.5/mailbox.pyRlscCsdS(s,Called after writing each message to file f.N((RR((s#/usr/local/lib/python2.5/mailbox.pyRpscCs3|i|io|in|iidS(sFlush and close the mailbox.N(RBRRDRRE(R((s#/usr/local/lib/python2.5/mailbox.pyREts

cCsh|idjo|in|dj	o9y|i|SWqdtj
otd|qdXndS(s'Return (start, stop) or raise KeyError.sNo message with key: %sN(RhR_t
_generate_tocR"(RR((s#/usr/local/lib/python2.5/mailbox.pyR{s
cCsS|iidd|i|i|i|}|i|i|ii|S(s;Append message to mailbox and return (start, stop) offsets.ii(RRMRt_install_messageRRB(RRtoffsets((s#/usr/local/lib/python2.5/mailbox.pyRs
N(R\R]R^R_R=RRR R$R+R4R6RCRDRBRRRRERR(((s#/usr/local/lib/python2.5/mailbox.pyRs"									,				
t	_mboxMMDFcBs>eZdZeZdZedZedZdZ	RS(sAn mbox or MMDF mailbox.cCs|i|\}}|ii||iiitid}|ii||ii}|i	|itid}|i
|d|S(s4Return a Message representation or raise a KeyError.RGs
i(RRRMRRRORRPRFRt_message_factorytset_from(RRRRt	from_linetstringR((s#/usr/local/lib/python2.5/mailbox.pyR(scCso|i|\}}|ii||p|iin|ii||ii}|itidS(s3Return a string representation or raise a KeyError.s
(	RRRMRRRFRRORRP(RRtfrom_RRR((s#/usr/local/lib/python2.5/mailbox.pyR*scCsY|i|\}}|ii||p|iint|i|ii|S(s6Return a file-like representation or raise a KeyError.(RRRMRRt_PartialFileR(RRRRR((s#/usr/local/lib/python2.5/mailbox.pyR)s
cCs:d}t|toX|idoH|id}|djo|| }||d}q|}d}nKt|tod|i}n't|tiio|i	}n|djodt
it
i}n|i
i}|i
i|ti|i||i
|i|i
i}||fS(s1Format a message and blindly write to self._file.sFrom s
iiRGsFrom MAILER-DAEMON %sN(R_RHRQRStfindt_mboxMMDFMessagetget_fromRIRtget_unixfromRtasctimetgmtimeRRRNRRPR[t
_mangle_from_(RRRtnewlineRR((s#/usr/local/lib/python2.5/mailbox.pyRs& 



(
R\R]R^R=RR(R<R*R)R(((s#/usr/local/lib/python2.5/mailbox.pyRs	
	cBs5eZdZeZdedZdZdZRS(sA classic mbox mailbox.cCs#t|_ti||||dS(sInitialize an mbox mailbox.N(R	RRR(RRRR((s#/usr/local/lib/python2.5/mailbox.pyRs	cCs+|idjo|itindS(s-Called before writing each message to file f.iN(RRNRRP(RR((s#/usr/local/lib/python2.5/mailbox.pyRscCsgg}}|iidxto|ii}|ii}|idoHt|t|jo|i|tti	n|i|q |djo|i|Pq q Wt
tt|||_
t|i
|_dS(s0Generate key-to-(start, stop) table of contents.isFrom RGN(RRMR=RRRRSRRRRPtdictt	enumeratetzipRhR(Rtstartststopstline_posRZ((s#/usr/local/lib/python2.5/mailbox.pyRs



N(	R\R]R^R=RR_RRR(((s#/usr/local/lib/python2.5/mailbox.pyRs
	cBs8eZdZdedZdZdZdZRS(sAn MMDF mailbox.cCs#t|_ti||||dS(sInitialize an MMDF mailbox.N(RRRR(RRRR((s#/usr/local/lib/python2.5/mailbox.pyRs	cCs|idtidS(s-Called before writing each message to file f.sN(RNRRP(RR((s#/usr/local/lib/python2.5/mailbox.pyRscCs|itidtidS(s,Called after writing each message to file f.sN(RNRRP(RR((s#/usr/local/lib/python2.5/mailbox.pyRscCsIgg}}|iidd}xto|}|ii}|ii}|idtio|i|xtoz|}|ii}|ii}|dtijo|i|t	tiPqx|djo|i|PqxqxWq&|djoPq&q&Wt
tt|||_
t	|i
|_dS(s0Generate key-to-(start, stop) table of contents.isRGN(RRMR=RRRRSRRPRRRRRRhR(RRRtnext_posRRZ((s#/usr/local/lib/python2.5/mailbox.pyRs2





N(	R\R]R^R_R=RRRR(((s#/usr/local/lib/python2.5/mailbox.pyRs
		cBseZdZdedZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZdZdZRS(sAn MH mailbox.cCsti||||tii|ipp|oVti|idtititii	|idti
tiBtiBdqt
|int|_dS(sInitialize an MH instance.is
.mh_sequencesiN(RRRRRdRReRERRfRtO_EXCLRRgR<R(RRRR((s#/usr/local/lib/python2.5/mailbox.pyRs!"c	Cs|i}t|djo
d}nt|d}tii|it|}t|}zp|i	ot
|nz8|i||t|t
o|i||nWd|i	ot|nXWdt|X|S(s$Add message and return assigned key.iiN(R-RtmaxRRRfRRQRRRR[RHR
t_dump_sequencesRRl(RRR-tnew_keyRR((s#/usr/local/lib/python2.5/mailbox.pyR#s"


cCstii|it|}yt|d}Wn?tj
o3}|itijot	d|qsnXzk|i
ot|nz3|iti
tii|it|Wd|i
ot|nXWd|iXdS(s=Remove the keyed message; raise KeyError if it doesn't exist.srb+sNo message with key: %sN(RRRfRRQRRRuRR"RRRER R(RRRRR((s#/usr/local/lib/python2.5/mailbox.pyR :s 

)
cCstii|it|}yt|d}Wn?tj
o3}|itijot	d|qsnXz|i
ot|nz[titi|ti
tiB|i||t|to|i||nWd|i
ot|nXWdt|XdS(s>Replace the keyed message; raise KeyError if it doesn't exist.srb+sNo message with key: %sN(RRRfRRQRRRuRR"RRRERtO_TRUNCR[RHR
RRRl(RRRRRR((s#/usr/local/lib/python2.5/mailbox.pyR$Ps$
#
cCs7y`|io+ttii|it|d}n(ttii|it|d}Wn?tj
o3}|iti	jot
d|qnXzH|iot|nzt|}Wd|iot
|nXWd|iXx8|iD]*\}}||jo|i|qqW|S(s4Return a Message representation or raise a KeyError.sr+RsNo message with key: %sN(RRRRRfRRQRRuRR"RR
RREt
get_sequencestadd_sequence(RRRRRRqtkey_list((s#/usr/local/lib/python2.5/mailbox.pyR(hs*
++



cCsy`|io+ttii|it|d}n(ttii|it|d}Wn?tj
o3}|iti	jot
d|qnXzF|iot|nz|iSWd|iot
|nXWd|iXdS(s3Return a string representation or raise a KeyError.sr+RsNo message with key: %sN(RRRRRfRRQRRuRR"RRFRRE(RRRR((s#/usr/local/lib/python2.5/mailbox.pyR*s 
++

cCswy+ttii|it|d}Wn?tj
o3}|itijot	d|qmnXt
|S(s6Return a file-like representation or raise a KeyError.RsNo message with key: %s(RRRRfRRQRRuRR"R(RRRR((s#/usr/local/lib/python2.5/mailbox.pyR)s+cCs&ttdti|iDS(sReturn an iterator over keys.css0x)|]"}|iot|VqqWdS(N(tisdigitR(t.0R((s#/usr/local/lib/python2.5/mailbox.pys	<genexpr>s	(titerRRRR(R((s#/usr/local/lib/python2.5/mailbox.pyR+scCs(tiitii|it|S(s9Return True if the keyed message exists, False otherwise.(RRRdRfRRQ(RR((s#/usr/local/lib/python2.5/mailbox.pyR4scCstt|iS(s*Return a count of messages in the mailbox.(RR,R+(R((s#/usr/local/lib/python2.5/mailbox.pyR6scCsL|ip>ttii|idd|_t|it|_ndS(sLock the mailbox.s
.mh_sequencessrb+N(	RRRRRfRRRR=(R((s#/usr/local/lib/python2.5/mailbox.pyRCs
$
cCs;|io-t|it|i|`t|_ndS(s#Unlock the mailbox if it is locked.N(RRRRlR<(R((s#/usr/local/lib/python2.5/mailbox.pyRDs



cCsdS(s&Write any pending changes to the disk.N((R((s#/usr/local/lib/python2.5/mailbox.pyRBscCs|io|indS(sFlush and close the mailbox.N(RRD(R((s#/usr/local/lib/python2.5/mailbox.pyREs
cCs]g}xPti|iD]<}tiitii|i|o|i|qqW|S(sReturn a list of folder names.(RRRRRRfR(RR8R((s#/usr/local/lib/python2.5/mailbox.pyRs%cCs+ttii|i|d|idtS(s+Return an MH instance for the named folder.RR(RRRRfRRR<(RR((s#/usr/local/lib/python2.5/mailbox.pyRscCs%ttii|i|d|iS(s:Create a folder and return an MH instance representing it.R(RRRRfRR(RR((s#/usr/local/lib/python2.5/mailbox.pyRscCstii|i|}ti|}|dgjo titii|dn%|gjontd|iti|dS(s-Delete the named folder, which must be empty.s
.mh_sequencessFolder not empty: %sN(RRRfRRR RR(RRRtentries((s#/usr/local/lib/python2.5/mailbox.pyRs 
c
Csh}ttii|idd}zGt|i}x.|D]&}y|id\}}t}xq|iD]c}|io|i	t
|qwd|idD\}	}
|it|	|
dqwWg}t
|D]}||jo||qq~||<t||djo||=nWqCtj
otd|iqCXqCWWd	|iX|S(
s=Return a name-to-key-list dictionary to define each sequence.s
.mh_sequencesRR`cssx|]}t|VqWdS(N(R(Rtx((s#/usr/local/lib/python2.5/mailbox.pys	<genexpr>s	t-iis"Invalid sequence specification: %sN(RRRRfRtsetR-RrRRRRAtrangeRRt
ValueErrortFormatErrortrstripRE(
RtresultsRtall_keysRZRqtcontentsR-tspecRRt_[1]R((s#/usr/local/lib/python2.5/mailbox.pyRs0!	

%c	Csottii|idd}z<titi|ititiBx|i	D]\}}t
|djoqWn|id|d
}t
}xtt|D]x}|d|jo"|pt}|idqn:|o!t
}|id||fn|id||}qW|o|it|d	qW|id	qWWWd
t|Xd
S(s:Set sequences using the given name-to-key-list dictionary.s
.mh_sequencessr+is%s:iRs%s %ss %ss
N(RRRRfRRERqRRR2RRNR_R<RRR=RQRl(Rt	sequencesRRqR-tprevt
completingR((s#/usr/local/lib/python2.5/mailbox.pyt
set_sequencess2!&

c	Cs|i}d}g}x|iD]}|d|jo|i||dfttdomtitii|it	|tii|it	|dti
tii|it	|qtitii|it	|tii|it	|dn|d7}q%W|d|_t
|djodSnxU|iD]G\}}x8|D]0\}}||jo|||i|<qnqnWq[W|i|dS(s?Re-name messages to eliminate numbering gaps. Invalidates keys.iiRjN(RR+RR;RRjRRfRRQtunlinkRsRRR3tindexR(	RRRtchangesRRqRtoldRb((s#/usr/local/lib/python2.5/mailbox.pytpack s0
!#)!'


cCs|i}|i}xY|iD]K\}}||jo|i|q%||jo||i|=q%q%Wx,|D]$}||jo|g||<q{q{W|i|dS(s;Inspect a new MHMessage and update sequences appropriately.N(RR2RR
R(RRRtpending_sequencest
all_sequencesRqRtsequence((s#/usr/local/lib/python2.5/mailbox.pyR9s



N(R\R]R^R_R=RRR R$R(R*R)R+R4R6RCRDRBRERRRRRRR
R(((s#/usr/local/lib/python2.5/mailbox.pyRs.																				cBseZdZedZdedZd	Zd
Z	dZ
dZd
ZdZ
dZdZdZdZdZdZRS(sAn Rmail-style Babyl mailbox.tunseentdeletedtfiledtansweredt	forwardedteditedtresentcCs#ti||||h|_dS(sInitialize a Babyl mailbox.N(RRt_labels(RRRR((s#/usr/local/lib/python2.5/mailbox.pyRNscCs=ti||}t|to|i|i|<n|S(s$Add message and return assigned key.(RRRHRt
get_labelsR(RRR((s#/usr/local/lib/python2.5/mailbox.pyRSscCs2ti||||ijo|i|=ndS(s=Remove the keyed message; raise KeyError if it doesn't exist.N(RR R(RR((s#/usr/local/lib/python2.5/mailbox.pyR ZscCs>ti|||t|to|i|i|<ndS(s>Replace the keyed message; raise KeyError if it doesn't exist.N(RR$RHRRR(RRR((s#/usr/local/lib/python2.5/mailbox.pyR$`sc	Cs|i|\}}|ii||iiti}x]toU|ii}|dtijp
|djoPn|i|i	tidqAWti}xYtoQ|ii}|tijp
|djoPn|i|i	tidqW|ii
||iii	tid}t|i
|}|i|i
||ijo|i|i|n|S(s4Return a Message representation or raise a KeyError.s*** EOOH ***RGs
(RRRMRRRJR=RRPRNRORFRRtgetvaluetset_visibleRt
set_labels(	RRRRtoriginal_headersRZtvisible_headerstbodyR((s#/usr/local/lib/python2.5/mailbox.pyR(fs0
!!!%	cCs|i|\}}|ii||iiti}x]toU|ii}|dtijp
|djoPn|i|i	tidqAWx=to5|ii}|tijp
|djoPqqW|i
|ii||iii	tidS(s3Return a string representation or raise a KeyError.s*** EOOH ***RGs
(
RRRMRRRJR=RRPRNRORRFR(RRRRRRZ((s#/usr/local/lib/python2.5/mailbox.pyR*s$
!!
	%cCs%ti|i|idtiS(s6Return a file-like representation or raise a KeyError.s
(RJR*RORRP(RR((s#/usr/local/lib/python2.5/mailbox.pyR)scCsT|it}x$|iiD]}|i|q#W|i|it|S(s4Return a list of user-defined labels in the mailbox.(RRRR1RAtdifference_updatet_special_labelsR,(Rtlabelst
label_list((s#/usr/local/lib/python2.5/mailbox.pyRs
	c
Csgg}}|iidd}g}xutom|}|ii}|ii}|dtijot|t|jo|i|ttin|i|g}|iidi	dD]*}|i
djo||i
qq~}	|i|	q,|djp|dtijo;t|t|jo|i|ttiqq,|djo|i|ttiPq,q,Wttt
|||_tt||_t|i|_dS(s0Generate key-to-(start, stop) table of contents.isit,RGsN(RRMR=RRRRRPRRRrtstripRRRRhRR(
RRRRtlabel_listsRRZRtlabelR"((s#/usr/local/lib/python2.5/mailbox.pyRs4

 -!"

cCs9|idtitidi|itifdS(s,Called before writing the mailbox to file f.s(BABYL OPTIONS:%sVersion: 5%sLabels:%s%sR$N(RNRRPRfR(RR((s#/usr/local/lib/python2.5/mailbox.pyRs	cCs|idtidS(s-Called before writing each message to file f.sN(RNRRP(RR((s#/usr/local/lib/python2.5/mailbox.pyRscCs|itiddS(s,Called after writing each message to file f.sN(RNRRP(RR((s#/usr/local/lib/python2.5/mailbox.pyRsc
CsX|ii}t|tog}g}xB|iD]4}||ijo|i|q8|i|q8W|iidx"|D]}|iid|qW|iidx&|D]}|iid|dqW|iiti	n|iidti	t|t
iioti}t
i
i
|td}|i||idxVtoN|i}|ii|idti	|djp
|d	joPqcqcW|iid
ti	t|toti}	t
i
i
|	td}
|
i|ixtoN|	i}|ii|idti	|djp
|d	joPqqWng|idxVtoN|i}|ii|idti	|djp
|d	joPqqWxbtoD|id}|d	joPn|ii|idti	qWnt|to|idd
}|d
djo|ii|| idti	|iid
ti	|ii|| idti	|ii||idti	q?|iid
ti	ti	|ii|idti	nt|do|i}
t}xto|i}|ii|idti	|djp
|d	jo:|iid
ti	|ot}|i|
qPqKqKWxftoD|id}|d	joPn|ii|idti	qWntdt||ii}||fS(s0Write message contents and return (start, stop).t1s, s,,t R$s1,,is
RGs*** EOOH ***is

iiRRsInvalid message type: %s(RRRHRRR!RRNRRPRIRRJRKR<RLRMR=RRROtget_visibleRFRQRR;RTRU(RRRtspecial_labelsR"R'torig_buffertorig_generatorRZt
vis_buffert
vis_generatorRXt
body_starttoriginal_post
first_passR((s#/usr/local/lib/python2.5/mailbox.pyRs






(

#

((RRRRRRRN(R\R]R^t	frozensetR!R_R=RRR R$R(R*R)RRRRRR(((s#/usr/local/lib/python2.5/mailbox.pyRHs 													cBs,eZdZddZdZdZRS(s0Message with mailbox-format-specific properties.cCst|tiio;|iti|t|to|i|qnt|to|iti|net	|do|iti
|n;|djotiii|nt
dt|dS(sInitialize a Message instance.RFsInvalid message type: %sN(RHRIRt_become_messagetcopytdeepcopyt_explain_toRQtmessage_from_stringR;tmessage_from_fileR_RRTRU(RR((s#/usr/local/lib/python2.5/mailbox.pyR&s
cCs)x"d
D]}|i||i|<qWd	S(s0Assume the non-format-specific state of message.t_headerst	_unixfromt_payloadt_charsettpreambletepiloguetdefectst
_default_typeN(R:R;R<R=R>R?R@RA(t__dict__(RRRq((s#/usr/local/lib/python2.5/mailbox.pyR45scCs(t|todSn
tddS(s:Copy format-specific state to message insofar as possible.Ns Cannot convert to specified type(RHRRT(RR((s#/usr/local/lib/python2.5/mailbox.pyR7;sN(R\R]R^R_RR4R7(((s#/usr/local/lib/python2.5/mailbox.pyR#s	cBs}eZdZd
dZdZdZdZdZdZ	dZ
dZd	Zd
Z
dZdZRS(s)Message with Maildir-specific properties.cCs5d|_d|_ti|_ti||dS(s%Initialize a MaildirMessage instance.RbRGN(t_subdirt_infoRt_dateRR(RR((s#/usr/local/lib/python2.5/mailbox.pyRFs		cCs|iS(sReturn 'new' or 'cur'.(RC(R((s#/usr/local/lib/python2.5/mailbox.pyRmMscCs;|djp
|djo
||_ntd|dS(sSet subdir to 'new' or 'cur'.RbRcs!subdir must be 'new' or 'cur': %sN(RCR(RR|((s#/usr/local/lib/python2.5/mailbox.pyRQs
cCs*|iido|idSndSdS(s*Return as a string the flags that are set.s2,iRGN(RDRS(R((s#/usr/local/lib/python2.5/mailbox.pyt	get_flagsXscCs ddit||_dS(s)Set the given flags and unset all others.s2,RGN(RfRRD(Rtflags((s#/usr/local/lib/python2.5/mailbox.pyt	set_flags_scCs0|idit|it|BdS(s.Set the given flag(s) without changing others.RGN(RHRfRRF(Rtflag((s#/usr/local/lib/python2.5/mailbox.pytadd_flagcscCsG|idjo0|idit|it|ndS(s7Unset the given string flag(s) without changing others.RGN(RFRHRfR(RRI((s#/usr/local/lib/python2.5/mailbox.pytremove_flaggscCs|iS(s<Return delivery date of message, in seconds since the epoch.(RE(R((s#/usr/local/lib/python2.5/mailbox.pyRzlscCs=yt||_Wn#tj
otd|nXdS(s9Set delivery date of message, in seconds since the epoch.scan't convert to float: %sN(tfloatRERRT(Rtdate((s#/usr/local/lib/python2.5/mailbox.pyRpscCs|iS(s%Get the message's "info" as a string.(RD(R((s#/usr/local/lib/python2.5/mailbox.pyRowscCs7t|to
||_ntdt|dS(s Set the message's "info" string.sinfo must be a string: %sN(RHRQRDRTRU(Rtinfo((s#/usr/local/lib/python2.5/mailbox.pyR{s
cCszt|to=|i|i|i|i|i|in*t|tot	|i}d|jo|i
dn|idjo|i
dnd|jo|i
dnd|jo|i
dnd|jo|i
dn|id	ti
|inIt|topt	|i}d|jo|id
nd|jo|idnd|jo|idqvnt|tot	|i}d|jo|id
nd|jo|id
nd|jo|idnd|jo|idqvn+t|tontdt|dS(s;Copy Maildir-specific state to message insofar as possible.tStRRctOtTtDtFtAs
MAILER-DAEMONRtrepliedtflaggedRRtPRs$Cannot convert to specified type: %sN(RHRRHRFRRmRRzRRRJRRRR
RRt	add_labelRRTRU(RRRG((s#/usr/local/lib/python2.5/mailbox.pyR7sN



#






N(R\R]R^R_RRmRRFRHRJRKRzRRoRR7(((s#/usr/local/lib/python2.5/mailbox.pyRCs										RcBs\eZdZd	dZdZd	dZdZdZdZ	dZ
dZRS(
s/Message with mbox- or MMDF-specific properties.cCs||idtt|tiioB|i}|dj	o%|ido|i|dqhnti||dS(s'Initialize an mboxMMDFMessage instance.s
MAILER-DAEMONsFrom iN(	RR=RHRIRRR_RSR(RRtunixfrom((s#/usr/local/lib/python2.5/mailbox.pyRscCs|iS(s Return contents of "From " line.(t_from(R((s#/usr/local/lib/python2.5/mailbox.pyRscCsR|dj	o8|tjoti}n|dti|7}n||_dS(s>Set "From " line, formatting and appending time_ if specified.R)N(R_R=RRRR[(RRttime_((s#/usr/local/lib/python2.5/mailbox.pyRs


cCs |idd|iddS(s*Return as a string the flags that are set.tStatusRGsX-Status(R'(R((s#/usr/local/lib/python2.5/mailbox.pyRFsc
Cst|}d
\}}x6dD].}||jo||7}|i|qqWx6dD].}||jo||7}|i|qXqXW|dit|7}y|id|Wn#tj
o|id|nXy|id|Wn#tj
o|id|nXd	S(
s)Set the given flags and unset all others.RGRPRQRSRTRUR]sX-StatusN(RGRG(RPRQ(RSRTRU(RR RfRtreplace_headerR"t
add_header(RRGtstatus_flagst
xstatus_flagsRI((s#/usr/local/lib/python2.5/mailbox.pyRHs*



cCs0|idit|it|BdS(s.Set the given flag(s) without changing others.RGN(RHRfRRF(RRI((s#/usr/local/lib/python2.5/mailbox.pyRJscCsNd|jp
d|jo0|idit|it|ndS(s7Unset the given string flag(s) without changing others.R]sX-StatusRGN(RHRfRRF(RRI((s#/usr/local/lib/python2.5/mailbox.pyRKsc	Cst|tot|i}d|jo|idnd|jo|idnd|jo|idnd|jo|idnd|jo|idn|d	=|d
=di|iid}y&|i	t
iti
|d
Wqttfj
oqXnt|to*|i|i|i|inGt|to~t|i}d|jo|idnd|jo|idnd|jo|idn|d	=|d
=nt|to~t|i}d|jo|idnd|jo|idnd|jo|idn|d	=|d
=n+t|tontdt|dS(sACopy mbox- or MMDF-specific state to message insofar as possible.RQRcRTRURPRORSRRtstatussx-statusR)is%a %b %d %H:%M:%S %YRRVRWRRs$Cannot convert to specified type: %sN(RHRRRFRRJRfRRrRtcalendarttimegmRtstrptimeRt
OverflowErrorRRHRR
RRRYRRTRU(RRRGt
maybe_date((s#/usr/local/lib/python2.5/mailbox.pyR7s^




	





N(R\R]R^R_RRRRFRHRJRKR7(((s#/usr/local/lib/python2.5/mailbox.pyRs						cBseZdZRS(s&Message with mbox-specific properties.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyR	scBsGeZdZddZdZdZdZdZdZ	RS(s$Message with MH-specific properties.cCsg|_ti||dS(s!Initialize an MHMessage instance.N(t
_sequencesRR(RR((s#/usr/local/lib/python2.5/mailbox.pyR$s	cCs|iS(s4Return a list of sequences that include the message.(Rh(R((s#/usr/local/lib/python2.5/mailbox.pyR)scCst||_dS(s3Set the list of sequences that include the message.N(R,Rh(RR((s#/usr/local/lib/python2.5/mailbox.pyR-scCsRt|to(||ijo|ii|qNntdt|dS(s8Add sequence to list of sequences including the message.ssequence must be a string: %sN(RHRQRhRRTRU(RR((s#/usr/local/lib/python2.5/mailbox.pyR1scCs.y|ii|Wntj
onXdS(sARemove sequence from the list of sequences including the message.N(RhR R(RR((s#/usr/local/lib/python2.5/mailbox.pytremove_sequence9scCst|tot|i}d|jo|idn|id|idd|jo|idnd|jo|idqnRt|to}t|i}d|jo|idn|id	d|jo|idnd|jo|id
qnt|to(x|iD]}|i|qDWnt|t	oRt|i}d|jo|i
dnd|jo|i
dqn+t|tontdt
|d
S(s6Copy MH-specific state to message insofar as possible.RRcRORWRTRVRPtRORQRURs$Cannot convert to specified type: %sN(RHRRRRRJRR
RRRYRRTRU(RRRR((s#/usr/local/lib/python2.5/mailbox.pyR7@sB











N(
R\R]R^R_RRRRRiR7(((s#/usr/local/lib/python2.5/mailbox.pyR
!s				cBsbeZdZd
dZdZdZdZdZdZ	dZ
dZd	ZRS(s'Message with Babyl-specific properties.cCs)g|_t|_ti||dS(s$Initialize an BabylMessage instance.N(RRt_visibleR(RR((s#/usr/local/lib/python2.5/mailbox.pyRjs	cCs|iS(s'Return a list of labels on the message.(R(R((s#/usr/local/lib/python2.5/mailbox.pyRpscCst||_dS(s&Set the list of labels on the message.N(R,R(RR"((s#/usr/local/lib/python2.5/mailbox.pyRtscCsRt|to(||ijo|ii|qNntdt|dS(s+Add label to list of labels on the message.slabel must be a string: %sN(RHRQRRRTRU(RR'((s#/usr/local/lib/python2.5/mailbox.pyRYxscCs.y|ii|Wntj
onXdS(s4Remove label from the list of labels on the message.N(RR R(RR'((s#/usr/local/lib/python2.5/mailbox.pytremove_labelscCs
t|iS(s3Return a Message representation of visible headers.(RRk(R((s#/usr/local/lib/python2.5/mailbox.pyR*scCst||_dS(s2Set the Message representation of visible headers.N(RRk(Rtvisible((s#/usr/local/lib/python2.5/mailbox.pyRscCsxI|iiD]8}||jo|ii|||q|i|=qWx@dD]8}||jo%||ijo|||i|<qSqSWdS(	s9Update and/or sensibly generate a set of visible headers.tDatetFromsReply-TotTotCCtSubjectN(RnRosReply-ToRpRqRr(RkR-R^(Rtheader((s#/usr/local/lib/python2.5/mailbox.pytupdate_visibles
cCs-t|tot|i}d|jo|idn|id|idd|jp
d|jo|idnd|jo|idnd	|jo|id
q)net|to}t|i}d|jo|idn|idd	|jo|id
nd|jo|idq)nt|toRt|i}d|jo|idnd|jo|idq)nvt|t	o;|i
|ixO|iD]}|i|qWn+t|t
ontdt|dS(s9Copy Babyl-specific state to message insofar as possible.RRcRORRRXRRPRRRRjRQRSRURVs$Cannot convert to specified type: %sN(RHRRRRRJRR
RRRR*RYRRTRU(RRR"R'((s#/usr/local/lib/python2.5/mailbox.pyR7sH











N(
R\R]R^R_RRRRYRlR*RRtR7(((s#/usr/local/lib/python2.5/mailbox.pyRgs							cBseZdZRS(s&Message with MMDF-specific properties.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyRsRcBsneZdZddZddZddZddZdZdZ	ddZ
d	Zd
ZRS(sA read-only wrapper of a file.cCs6||_|djo|i|_n
||_dS(sInitialize a _ProxyFile.N(RR_Rt_pos(RRtpos((s#/usr/local/lib/python2.5/mailbox.pyRs	
cCs|i||iiS(sRead bytes.(t_readRRF(Rtsize((s#/usr/local/lib/python2.5/mailbox.pyRFscCs|i||iiS(sRead a line.(RwRRR(RRx((s#/usr/local/lib/python2.5/mailbox.pyRRscCs[g}xN|D]F}|i||dj	o&|t|8}|djoPqSq
q
W|S(sRead multiple lines.iN(RR_R(RtsizehintR8RZ((s#/usr/local/lib/python2.5/mailbox.pyt	readliness



cCst|idS(sIterate over lines.RG(RRR(R((s#/usr/local/lib/python2.5/mailbox.pyR0scCs|iS(sReturn the position.(Ru(R((s#/usr/local/lib/python2.5/mailbox.pyRsicCsM|djo|ii|in|ii|||ii|_dS(sChange position.iN(RRMRuR(Rtoffsettwhence((s#/usr/local/lib/python2.5/mailbox.pyRMs
cCs
|`dS(sClose the file.N(R(R((s#/usr/local/lib/python2.5/mailbox.pyREscCsL|djo
d}n|ii|i||}|ii|_|S(s"Read size bytes using read_method.iN(R_RRMRuR(RRxtread_methodR8((s#/usr/local/lib/python2.5/mailbox.pyRws

N(
R\R]R^R_RRFRRRzR0RRMRERw(((s#/usr/local/lib/python2.5/mailbox.pyRs			RcBs;eZdZdddZdZddZdZRS(s&A read-only wrapper of part of a file.cCs)ti|||||_||_dS(sInitialize a _PartialFile.N(RRt_startt_stop(RRRR((s#/usr/local/lib/python2.5/mailbox.pyRs	cCsti||iS(s*Return the position with respect to start.(RRR~(R((s#/usr/local/lib/python2.5/mailbox.pyRsicCs]|djo|i|_d}n$|djo|i|_d}nti|||dS(s8Change position, possibly with respect to start or stop.iiiN(R~RuRRRM(RR{R|((s#/usr/local/lib/python2.5/mailbox.pyRMs



cCsi|i|i}|djodSn|djp|djp
||jo
|}nti|||S(s;Read size bytes using read_method, honoring start and stop.iRGN(RRuR_RRw(RRxR}t	remaining((s#/usr/local/lib/python2.5/mailbox.pyRws
'
N(R\R]R^R_RRRMRw(((s#/usr/local/lib/python2.5/mailbox.pyRs
	
cCst}ytopyti|titiBWqtj
o?}|ititifjot	d|i
q|qXn|o;y!t|i
d}|iWn3tj
o'}|itijodSqnXyht
tdo4ti|i
|i
dt}ti|i
n!ti|i
|i
dt}Wqtj
oi}|itijp#ti
djo:|itijo'ti|i
t	d|i
qqXnWnGtoti|tin|oti|i
dnnXdS(s(Lock file f using lockf and dot locking.slockf: lock unavailable: %ss.lockNRjRsdot lock unavailable: %s(R<tfcntltlockftLOCK_EXtLOCK_NBRRutEAGAINRRwRqRRER;RRjR=R	RsRtRvR tLOCK_UN(RRtdotlock_doneRtpre_lock((s#/usr/local/lib/python2.5/mailbox.pyR$sL
#cCsTtoti|tintii|idoti|idndS(s*Unlock file f using lockf and dot locking.s.lockN(RRRRRRdRqR (R((s#/usr/local/lib/python2.5/mailbox.pyRQscCsIti|titiBtiB}zt|dSWdti|XdS(sCCreate a file if it doesn't exist and open for reading and writing.srb+N(RRRRtO_RDWRRE(Rtfd((s#/usr/local/lib/python2.5/mailbox.pyRXs#cCs2td|ttititifS(sBCreate a temp file based on path and open for reading and writing.s%s.%s.%s.%s(RRRRRRR(R((s#/usr/local/lib/python2.5/mailbox.pyR`s	cCs5|ittdoti|indS(s0Ensure changes to file f are physically on disk.tfsyncN(RBR;RRtfileno(R((s#/usr/local/lib/python2.5/mailbox.pyt_sync_flushfs
cCst||idS(s:Close file f, ensuring all changes are physically on disk.N(RRE(R((s#/usr/local/lib/python2.5/mailbox.pyRlls
t_MailboxcBs)eZeidZdZdZRS(cCs||_d|_||_dS(Ni(tfptseekpR(RRR((s#/usr/local/lib/python2.5/mailbox.pyRxs		cCst|idS(N(RRR_(R((s#/usr/local/lib/python2.5/mailbox.pyR0}scCsx|ii|iy|iWn)tj
o|ii|_dSnX|ii}|i|ii|_}||joPqq|it	|i||S(N(
RRMRt
_search_starttEOFErrorRR_t_search_endRR(RRR((s#/usr/local/lib/python2.5/mailbox.pyRs	

(R\R]RRRR0R(((s#/usr/local/lib/python2.5/mailbox.pyRvs	cBs>eZdZdZdZdZdZdZeZ	RS(cCsrxk|ii}|ii}|p
tn|d djo(|i|o|ii|dSqqdS(NisFrom (RRRRRt_isrealfromlineRM(RRvRZ((s#/usr/local/lib/python2.5/mailbox.pyRs
!cCs}|iixi|ii}|ii}|pdSn|d djo(|i|o|ii|dSqqdS(NisFrom (RRRRRRM(RRvRZ((s#/usr/local/lib/python2.5/mailbox.pyRs
!saFrom \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*[^\s]*\s*$cCs?|ip%ddk}|i|i|_n|ii|S(Ni(t_regexptretcompilet_fromlinepatterntmatch(RRZR((s#/usr/local/lib/python2.5/mailbox.pyt_strict_isrealfromlines
cCstS(N(R=(RRZ((s#/usr/local/lib/python2.5/mailbox.pyt_portable_isrealfromlinesN(
R\R]RRRR_RRRR(((s#/usr/local/lib/python2.5/mailbox.pyR
s	
	$		cBseZeiZRS((R\R]R
RR(((s#/usr/local/lib/python2.5/mailbox.pyRscBseZdZdZRS(cCsCx<|ii}|p
tn|d djodSqqdS(Nis
(RRRR(RRZ((s#/usr/local/lib/python2.5/mailbox.pyRs
cCs\xU|ii}|ii}|pdSn|djo|ii|dSqqdS(Ns
(RRRRRM(RRvRZ((s#/usr/local/lib/python2.5/mailbox.pyRs
(R\R]RR(((s#/usr/local/lib/python2.5/mailbox.pyRs	cBs)eZeidZdZdZRS(cCsddk}|id}||_ti|i}t|i|}tt|}|i	tt
||_|ii||_
dS(Nis
^[1-9][0-9]*$(RRRiRRtfilterRtmaptlongtsortRQtboxestreverseR(RRiRRtpatR,((s#/usr/local/lib/python2.5/mailbox.pyRs	

cCst|idS(N(RRR_(R((s#/usr/local/lib/python2.5/mailbox.pyR0scCs{|ipdSn|ii}ttii|i|}|i|}y
||_	Wnt
tfj
onX|S(N(RR_R9RRRRfRiRt	_mh_msgnotAttributeErrorRT(RtfnRR((s#/usr/local/lib/python2.5/mailbox.pyRs

(R\R]RRRR0R(((s#/usr/local/lib/python2.5/mailbox.pyRs	cBseZdZdZRS(cCs?x8|ii}|p
tn|djodSqqdS(Ns
*** EOOH ***
(RRRR(RRZ((s#/usr/local/lib/python2.5/mailbox.pyRs

cCsixb|ii}|ii}|pdSn|djp
|djo|ii|dSqqdS(Ns
s(RRRRRM(RRvRZ((s#/usr/local/lib/python2.5/mailbox.pyRs(R\R]RR(((s#/usr/local/lib/python2.5/mailbox.pyR
s	tErrorcBseZdZRS(s"Raised for module-specific errors.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyR$sRgcBseZdZRS(s:The specified mailbox does not exist and won't be created.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyRg'sRcBseZdZRS(s>The specified mailbox is not empty and deletion was requested.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyR*sRwcBseZdZRS(s)Another process caused an action to fail.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyRw-sRcBseZdZRS(s)A file appears to have an invalid format.(R\R]R^(((s#/usr/local/lib/python2.5/mailbox.pyR0s(6R^tsysRRRcRRuR5RIt
email.Messagetemail.GeneratorRRJtplatformtImportErrorRR_t__all__RRRRRRRRRRRR	R
RRRRR=RRRRRRlRR
RRRRt	ExceptionRRgRRwR(((s#/usr/local/lib/python2.5/mailbox.pys<module>st
	8!+5 koF];!-					
B"

Man Man