%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/mailbox.pyc


Mac@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZy(ejdkre
nddlZWne
k
reZnXddlZej0ejrejddenddlZWdQXdddd	d
ddd
dddddddddgZdfdYZdefdYZdefdYZdefdYZdefdYZdefdYZd	efdYZd
efd YZdejj fd!YZ d
e fd"YZ!d#e fd$YZ"de"fd%YZ#de fd&YZ$de fd'YZ%de"fd(YZ&d)fd*YZ'd+e'fd,YZ(e)d-Z*d.Z+d/Z,d0Z-d1Z.d2Z/d3fd4YZ0de0fd5YZ1de1fd6YZ2de0fd7YZ3dfd8YZ4de0fd9YZ5d:e6fd;YZ7d<e7fd=YZ8d>e7fd?YZ9d@e7fdAYZ:dBe7fdCYZ;dS(DsDRead/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.iNtos2emxtignores.*rfc822 has been removedtMailboxtMaildirtmboxtMHtBabyltMMDFtMessagetMaildirMessagetmboxMessaget	MHMessagetBabylMessagetMMDFMessagetUnixMailboxtPortableUnixMailboxtMmdfMailboxt	MHMailboxtBabylMailboxcBs4eZdZdedZdZdZdZdZ	dZ
ddZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZdZdZddZdZddZdZdZdZ dZ!e"Z#e"dZ$RS( s*A group of messages in a particular place.cCs.tjjtjj||_||_dS(sInitialize a Mailbox instance.N(tostpathtabspatht
expandusert_patht_factory(tselfRtfactorytcreate((s#/usr/local/lib/python2.7/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.7/mailbox.pytadd0scCstddS(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.7/mailbox.pytremove4scCs|j|dS(N(R!(RR ((s#/usr/local/lib/python2.7/mailbox.pyt__delitem__8scCs)y|j|Wntk
r$nXdS(s'If the keyed message exists, remove it.N(R!tKeyError(RR ((s#/usr/local/lib/python2.7/mailbox.pytdiscard;s
cCstddS(s>Replace the keyed message; raise KeyError if it doesn't exist.s&Method must be implemented by subclassN(R(RR R((s#/usr/local/lib/python2.7/mailbox.pyt__setitem__BscCs*y|j|SWntk
r%|SXdS(s9Return the keyed message, or default if it doesn't exist.N(t__getitem__R#(RR tdefault((s#/usr/local/lib/python2.7/mailbox.pytgetFs
cCs0|js|j|S|j|j|SdS(s=Return the keyed message; raise KeyError if it doesn't exist.N(Rtget_messagetget_file(RR ((s#/usr/local/lib/python2.7/mailbox.pyR&Ms	
cCstddS(s4Return a Message representation or raise a KeyError.s&Method must be implemented by subclassN(R(RR ((s#/usr/local/lib/python2.7/mailbox.pyR)TscCstddS(s3Return a string representation or raise a KeyError.s&Method must be implemented by subclassN(R(RR ((s#/usr/local/lib/python2.7/mailbox.pyt
get_stringXscCstddS(s6Return a file-like representation or raise a KeyError.s&Method must be implemented by subclassN(R(RR ((s#/usr/local/lib/python2.7/mailbox.pyR*\scCstddS(sReturn an iterator over keys.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.7/mailbox.pytiterkeys`scCst|jS(sReturn a list of keys.(tlistR,(R((s#/usr/local/lib/python2.7/mailbox.pytkeysdsccsEx>|jD]0}y||}Wntk
r7q
nX|Vq
WdS(s%Return an iterator over all messages.N(R,R#(RR tvalue((s#/usr/local/lib/python2.7/mailbox.pyt
itervalueshs
cCs
|jS(N(R0(R((s#/usr/local/lib/python2.7/mailbox.pyt__iter__qscCst|jS(s,Return a list of messages. Memory intensive.(R-R0(R((s#/usr/local/lib/python2.7/mailbox.pytvaluestsccsKxD|jD]6}y||}Wntk
r7q
nX||fVq
WdS(s.Return an iterator over (key, message) tuples.N(R,R#(RR R/((s#/usr/local/lib/python2.7/mailbox.pyt	iteritemsxs
cCst|jS(s9Return a list of (key, message) tuples. Memory intensive.(R-R3(R((s#/usr/local/lib/python2.7/mailbox.pytitemsscCstddS(s9Return True if the keyed message exists, False otherwise.s&Method must be implemented by subclassN(R(RR ((s#/usr/local/lib/python2.7/mailbox.pythas_keyscCs
|j|S(N(R5(RR ((s#/usr/local/lib/python2.7/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.7/mailbox.pyt__len__scCs(x!|jD]}|j|q
WdS(sDelete all messages.N(R,R$(RR ((s#/usr/local/lib/python2.7/mailbox.pytclearscCs4y||}Wntk
r"|SX|j||S(s3Delete the keyed message and return it, or default.(R#R$(RR R'tresult((s#/usr/local/lib/python2.7/mailbox.pytpops

cCs7x0|jD]}||j|fSWtddS(s6Delete an arbitrary (key, message) pair and return it.sNo messages in mailboxN(R,R:R#(RR ((s#/usr/local/lib/python2.7/mailbox.pytpopitemscCst|dr|j}n$t|dr<|j}n|}t}x<|D]4\}}y|||<WqOtk
rt}qOXqOW|rtdndS(s4Change the messages that correspond to certain keys.R3R4sNo message with key(s)N(thasattrR3R4tFalseR#tTrue(Rtargtsourcetbad_keyR R((s#/usr/local/lib/python2.7/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.7/mailbox.pytflushscCstddS(sLock the mailbox.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.7/mailbox.pytlockscCstddS(s#Unlock the mailbox if it is locked.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.7/mailbox.pytunlockscCstddS(sFlush and close the mailbox.s&Method must be implemented by subclassN(R(R((s#/usr/local/lib/python2.7/mailbox.pytclosesc	Cs	t|tjjrtj}tjj||d}|j||jd|j	j
dtj}|j
||jr|jtjr|j
tjqnXt|tr+|r|j
dd}n|j
dtj}|j
||jr|jtjr|j
tjqnt|drd}xttr|j}|dkrePn|r|jdrd|d	}n|j
dtj}|j
||}qCW|jr|r|jtjr|j
tjqntd
t|dS(s%Dump message contents to target file.is
s
From s
>From treadtsFrom s>From isInvalid message type: %sN(t
isinstancetemailRRtStringIOt	generatort	GeneratortflattentseekRGtreplaceRtlineseptwritet_append_newlinetendswithtstrR<tNoneR>treadlinet
startswitht	TypeErrorttype(	RRttargettmangle_from_tbuffertgentdatatlastlinetline((s#/usr/local/lib/python2.7/mailbox.pyt
_dump_messages<



	

"N(%t__name__t
__module__t__doc__RVR>RRR!R"R$R%R(R&R)R+R*R,R.R0R1R2R3R4R5R6R7R8R:R;RBRCRDRERFR=RSRb(((s#/usr/local/lib/python2.7/mailbox.pyR(s@																												cBseZdZdZejedZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(sA qmail-style Maildir mailbox.t:cCs
tj||||itjj|jdd6tjj|jdd6tjj|jdd6|_tjj|js|rtj|jdx9|jj	D]}tj|dqWqt
|jni|_idd6dd6|_d|_
d|_dS(sInitialize a Maildir instance.ttmptnewtcuriig?N(RRRRtjoinRt_pathstexiststmkdirR2tNoSuchMailboxErrort_toct_toc_mtimest
_last_readt_skewfactor(RtdirnameRRR((s#/usr/local/lib/python2.7/mailbox.pyRs		cCs|j}y|j||Wn.tk
rP|jtj|jnXt|t|t	r|j
}|j|j}||jkrd}qnd}d}tj
j|jj|jd}tj
j|j|||}t|t	r4tj|jtj
j|j|jfnyLttdrltj|j|tj|jntj|j|WnKtk
r}tj|j|jtjkrtd|qnX|S(s$Add message and return assigned key.RHRhitlinks$Name clash with existing message: %s(t_create_tmpRbt
BaseExceptionRFRR!tnamet_sync_closeRIR	t
get_subdirtcolontget_infoRtbasenametsplitRjRtutimetgetatimetget_dateR<RttrenametOSErrorterrnotEEXISTtExternalClashError(RRttmp_filetsubdirtsuffixtuniqtdestte((s#/usr/local/lib/python2.7/mailbox.pyRs@


%%
cCs,tjtjj|j|j|dS(s=Remove the keyed message; raise KeyError if it doesn't exist.N(RR!RRjRt_lookup(RR ((s#/usr/local/lib/python2.7/mailbox.pyR!4scCsSy|j|Wn;tk
r$n+tk
rN}|jtjkrOqOnXdS(s'If the keyed message exists, remove it.N(R!R#RRtENOENT(RR R((s#/usr/local/lib/python2.7/mailbox.pyR$8s
cCs$|j|}|j|}|j|}t|trE|}n|}tjj|}|j|kr|j|j|jd}nd}|j	|tjj
|j|}	tjj
|j|||}
t|trtj|	tjj
|	|jfntj|	|
dS(s>Replace the keyed message; raise KeyError if it doesn't exist.iRHN(RRRIR	RRRsRzR}R$RjRR~RRR(RR Rtold_subpathttemp_keyttemp_subpathtdominant_subpathRRttmp_pathtnew_path((s#/usr/local/lib/python2.7/mailbox.pyR%Cs"	 
	"cCs|j|}ttjj|j|d}z+|jrN|j|}nt|}Wd|jXtjj	|\}}|j
||j|kr|j|j	|jdn|j
tjjtjj|j||S(s4Return a Message representation or raise a KeyError.trNi(RtopenRRRjRRR	RFR}t
set_subdirRztset_infotset_datetgetmtime(RR tsubpathtftmsgRRw((s#/usr/local/lib/python2.7/mailbox.pyR)^s!	
 +cCsJttjj|j|j|d}z|jSWd|jXdS(s3Return a string representation or raise a KeyError.RN(RRRRjRRRGRF(RR R((s#/usr/local/lib/python2.7/mailbox.pyR+ps*cCs4ttjj|j|j|d}t|S(s6Return a file-like representation or raise a KeyError.trb(RRRRjRRt
_ProxyFile(RR R((s#/usr/local/lib/python2.7/mailbox.pyR*xs*ccsO|jx>|jD]3}y|j|Wntk
rAqnX|VqWdS(sReturn an iterator over keys.N(t_refreshRoRR#(RR ((s#/usr/local/lib/python2.7/mailbox.pyR,}s

cCs|j||jkS(s9Return True if the keyed message exists, False otherwise.(RRo(RR ((s#/usr/local/lib/python2.7/mailbox.pyR5s
cCs|jt|jS(s*Return a count of messages in the mailbox.(RtlenRo(R((s#/usr/local/lib/python2.7/mailbox.pyR7s
cCsdS(s"Write any pending changes to disk.N((R((s#/usr/local/lib/python2.7/mailbox.pyRCscCsdS(sLock the mailbox.N((R((s#/usr/local/lib/python2.7/mailbox.pyRDscCsdS(s#Unlock the mailbox if it is locked.N((R((s#/usr/local/lib/python2.7/mailbox.pyREscCsdS(sFlush and close the mailbox.N((R((s#/usr/local/lib/python2.7/mailbox.pyRFscCsg}xttj|jD]`}t|dkr|ddkrtjjtjj|j|r|j|dqqW|S(sReturn a list of folder names.iit.(RtlistdirRRRtisdirRjtappend(RR9tentry((s#/usr/local/lib/python2.7/mailbox.pytlist_folderss"$cCs/ttjj|jd|d|jdtS(s/Return a Maildir instance for the named folder.RRR(RRRRjRRR=(Rtfolder((s#/usr/local/lib/python2.7/mailbox.pyt
get_folders	cCstjj|jd|}t|d|j}tjj|d}tjj|stjtj|tj	tj
Bdn|S(s>Create a folder and return a Maildir instance representing it.RRt
maildirfolderi(RRRjRRRRlRFRtO_CREATtO_WRONLY(RRRR9tmaildirfolder_path((s#/usr/local/lib/python2.7/mailbox.pyt
add_folders
cCstjj|jd|}xwtjtjj|dtjtjj|dD];}t|dks|ddkrWtd|qWqWWxutj|D]d}|dkr|dkr|dkrtjjtjj||rtd||fqqWxtj|d	t	D]i\}}}x*|D]"}tj
tjj||q:Wx*|D]"}tjtjj||qgWq$Wtj|d
S(s-Delete the named folder, which must be empty.RRhRiiisFolder contains message(s): %sRgs%Folder contains subdirectory '%s': %sttopdownN(RRRjRRRt
NotEmptyErrorRtwalkR=R!trmdir(RRRRtroottdirstfiles((s#/usr/local/lib/python2.7/mailbox.pyt
remove_folders #"$!%
 
$cCstj}xptjtjj|jdD]M}tjj|jd|}|tjj|dkr.tj|q.q.WdS(sDelete old files in "tmp".Rgi@N(ttimeRRRRjRRR!(RtnowRR((s#/usr/local/lib/python2.7/mailbox.pytcleans
(icCsItj}tj}d|kr9|jdd}nd|krZ|jdd}ndt|t|ddtjtj|f}tj	j
|jd|}ytj|Wnvt
k
r4}|jtjkr.tjd7_yt|SWq1t
k
r*}|jtjkr+q+q1Xq5nXtd	|d
S(s=Create a file in the tmp subdirectory and open and return it.t/s\057Rfs\072s%s.M%sP%sQ%s.%sig.ARgs&Name clash prevented file creation: %sN(RtsockettgethostnameRPtintRtgetpidRt_countRRjRtstatRRRt_create_carefullyRR(RRthostnameRRR((s#/usr/local/lib/python2.7/mailbox.pyRus,&
cCs?tj|jd|jkrt}xS|jD]H}tjj|j|}||j|krkt	}n||j|<q0W|sdSni|_
x|jD]}|j|}xvtj|D]e}tjj||}tjj
|rqn|j|jd}tjj|||j
|<qWqWtj|_dS(s!Update table of contents mapping.iNi(RRqRrR=RpRRRRkR>RoRRjRR}Rz(RtrefreshRtmtimeRRtpR((s#/usr/local/lib/python2.7/mailbox.pyRs& 		
$cCsy:tjjtjj|j|j|r9|j|SWntk
rMnX|jy|j|SWn!tk
rtd|nXdS(s=Use TOC to return subpath for given key, or raise a KeyError.sNo message with key: %sN(RRRlRjRRoR#R(RR ((s#/usr/local/lib/python2.7/mailbox.pyRs+


cCsot|ds!|j|_nxGtrjy||jjSWq$tk
rSdStk
rfq$q$Xq$WdS(s0Return the next message in a one-time iteration.t
_onetime_keysN(R<R,RR>tnextt
StopIterationRVR#(R((s#/usr/local/lib/python2.7/mailbox.pyR's	

( RcRdReRztrfc822RR>RRR!R$R%R)R+R*R,R5R7RCRDRERFRRRRRRRuRRR(((s#/usr/local/lib/python2.7/mailbox.pyRs6	)							
										
				$	t_singlefileMailboxcBseZdZdedZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZddZdZRS(sA single-file mailbox.cCstj||||yt|jd}Wntk
r}|jtjkr}|rkt|jd}qt|jq|jtjtj	fkrt|jd}qnX||_
d|_d|_
t|_t|_t|_d|_dS(s!Initialize a single-file mailbox.srb+swb+RiN(RRRRtIOErrorRRRntEACCEStEROFSt_fileRVRot	_next_keyR=t_pendingt
_pending_synct_lockedt_file_length(RRRRRR((s#/usr/local/lib/python2.7/mailbox.pyR7s$						cCsF|j|j||j|j<|jd7_t|_|jdS(s$Add message and return assigned key.i(Rt_append_messageRoRR>R(RR((s#/usr/local/lib/python2.7/mailbox.pyRNs

	cCs$|j||j|=t|_dS(s=Remove the keyed message; raise KeyError if it doesn't exist.N(RRoR>R(RR ((s#/usr/local/lib/python2.7/mailbox.pyR!Xs

cCs0|j||j||j|<t|_dS(s>Replace the keyed message; raise KeyError if it doesn't exist.N(RRRoR>R(RR R((s#/usr/local/lib/python2.7/mailbox.pyR%^s
ccs-|jx|jjD]}|VqWdS(sReturn an iterator over keys.N(RRoR.(RR ((s#/usr/local/lib/python2.7/mailbox.pyR,ds
cCs|j||jkS(s9Return True if the keyed message exists, False otherwise.(RRo(RR ((s#/usr/local/lib/python2.7/mailbox.pyR5js
cCs|jt|jS(s*Return a count of messages in the mailbox.(RRRo(R((s#/usr/local/lib/python2.7/mailbox.pyR7os
cCs&|js"t|jt|_ndS(sLock the mailbox.N(Rt
_lock_fileRR>(R((s#/usr/local/lib/python2.7/mailbox.pyRDts	
cCs&|jr"t|jt|_ndS(s#Unlock the mailbox if it is locked.N(Rt_unlock_fileRR=(R((s#/usr/local/lib/python2.7/mailbox.pyREzs	
cCs|js/|jr+t|jt|_ndS|jdk	sDt|jjdd|jj	}||j
krtd|j
|fnt|j
}yi}|j|xt|jjD]}|j|\}}|jj||j||j	}xOtr_|jjtd||jj	}|dkrOPn|j|qW||j	f||<|j|qW|j	|_
Wn$|jtj|jnXt||jjtj|j
j}	tj|j|	ytj|j|j
Wnrt k
r}
|
j!t!j"ks\tjdkr|
j!t!j#krtj|j
tj|j|j
qnXt$|j
d|_||_t|_t|_|j%rt&|jd	tndS(
s"Write any pending changes to disk.Niis4Size of mailbox file changed (expected %i, found %i)iRHtos2srb+tdotlock('RRt_sync_flushRR=RoRVtAssertionErrorROttellRRt_create_temporaryRt_pre_mailbox_hooktsortedR.t_pre_message_hookR>RGtminRRt_post_message_hookRFRR!RwRxRtst_modetchmodRRRRRRRR(Rtcur_lentnew_filetnew_tocR tstarttstopt	new_startR]tmodeR((s#/usr/local/lib/python2.7/mailbox.pyRCsf		


	


!				cCsdS(s,Called before writing the mailbox to file f.N((RR((s#/usr/local/lib/python2.7/mailbox.pyRscCsdS(s-Called before writing each message to file f.N((RR((s#/usr/local/lib/python2.7/mailbox.pyRscCsdS(s,Called after writing each message to file f.N((RR((s#/usr/local/lib/python2.7/mailbox.pyRscCsAz|jWdz|jr*|jnWd|jjXXdS(sFlush and close the mailbox.N(RCRRERRF(R((s#/usr/local/lib/python2.7/mailbox.pyRFs	cCsb|jdkr|jn|dk	r^y|j|SWq^tk
rZtd|q^XndS(s'Return (start, stop) or raise KeyError.sNo message with key: %sN(RoRVt
_generate_tocR#(RR ((s#/usr/local/lib/python2.7/mailbox.pyRs

cCs|jjdd|jj}t|jdkrT|jrT|j|jny3|j|j|j|}|j	|jWn$t
k
r|jj|nX|jj|jj|_
|S(s;Append message to mailbox and return (start, stop) offsets.ii(RRORRRoRRRt_install_messageRRvttruncateRCR(RRtbeforetoffsets((s#/usr/local/lib/python2.7/mailbox.pyRs

N(RcRdReRVR>RRR!R%R,R5R7RDRERCRRRRFRR(((s#/usr/local/lib/python2.7/mailbox.pyR4s"	
								D				
t	_mboxMMDFcBs>eZdZeZdZedZedZdZ	RS(sAn mbox or MMDF mailbox.cCs|j|\}}|jj||jjjtjd}|jj||jj}|j	|jtjd}|j
|d|S(s4Return a Message representation or raise a KeyError.RHs
i(RRRORWRPRRQRGRt_message_factorytset_from(RR RRt	from_linetstringR((s#/usr/local/lib/python2.7/mailbox.pyR)scCsm|j|\}}|jj||s;|jjn|jj||jj}|jtjdS(s3Return a string representation or raise a KeyError.s
(	RRRORWRGRRPRRQ(RR tfrom_RRR((s#/usr/local/lib/python2.7/mailbox.pyR+scCsW|j|\}}|jj||s;|jjnt|j|jj|S(s6Return a file-like representation or raise a KeyError.(RRRORWt_PartialFileR(RR RRR((s#/usr/local/lib/python2.7/mailbox.pyR*s
cCs/d}t|tri|jdri|jd}|dkrZ|| }||d}q|}d}nFt|trd|j}n$t|tjj	r|j
}n|dkrdtjtj
}n|jj}|jj|tj|j||j|j|jj}||fS(s1Format a message and blindly write to self._file.sFrom s
iiRHsFrom MAILER-DAEMON %sN(RVRIRURXtfindt_mboxMMDFMessagetget_fromRJRRtget_unixfromRtasctimetgmtimeRRRRRRQRbt
_mangle_from_(RRRtnewlineRR((s#/usr/local/lib/python2.7/mailbox.pyRs&
	(
RcRdReR>RR)R=R+R*R(((s#/usr/local/lib/python2.7/mailbox.pyRs	
	cBs;eZdZeZeZdedZdZdZ	RS(sA classic mbox mailbox.cCs#t|_tj||||dS(sInitialize an mbox mailbox.N(R
RRR(RRRR((s#/usr/local/lib/python2.7/mailbox.pyR=s	cCs|jtjdS(s,Called after writing each message to file f.N(RRRRQ(RR((s#/usr/local/lib/python2.7/mailbox.pyRBscCs\gg}}t}|jjdxtr|jj}|jj}|jdrt|t|kr|r|j|tt	j
q|j|n|j|t}q&|s|r|j|tt	j
n
|j|Pq&|t	j
krt}q&t}q&Wttt
|||_t|j|_|jj|_dS(s0Generate key-to-(start, stop) table of contents.isFrom N(R=RROR>RRWRXRRRRQtdictt	enumeratetzipRoRR(Rtstartststopstlast_was_emptytline_posRa((s#/usr/local/lib/python2.7/mailbox.pyRFs0
	
	
	
N(
RcRdReR>RRSRVRRR(((s#/usr/local/lib/python2.7/mailbox.pyR4s	cBs8eZdZdedZdZdZdZRS(sAn MMDF mailbox.cCs#t|_tj||||dS(sInitialize an MMDF mailbox.N(R
RRR(RRRR((s#/usr/local/lib/python2.7/mailbox.pyRks	cCs|jdtjdS(s-Called before writing each message to file f.sN(RRRRQ(RR((s#/usr/local/lib/python2.7/mailbox.pyRpscCs|jtjdtjdS(s,Called after writing each message to file f.sN(RRRRQ(RR((s#/usr/local/lib/python2.7/mailbox.pyRtscCsbgg}}|jjdd}xtr|}|jj}|jj}|jdtjr|j|xtr|}|jj}|jj}|dtjkr|j|t	tjPqv|dkrv|j|PqvqvWq&|dkr&Pq&q&Wt
tt|||_
t	|j
|_|jjdd|jj|_dS(s0Generate key-to-(start, stop) table of contents.isRHiN(RROR>RWRRXRRQRRRRRRoRR(RRRtnext_posRRa((s#/usr/local/lib/python2.7/mailbox.pyRxs2
	
	
N(	RcRdReRVR>RRRR(((s#/usr/local/lib/python2.7/mailbox.pyRhs
		cBseZdZdedZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZdZdZRS(sAn MH mailbox.cCstj||||tjj|js|rtj|jdtjtjtjj	|jdtj
tjBtjBdqt
|jnt|_dS(sInitialize an MH instance.is
.mh_sequencesiN(RRRRRlRRmRFRRjRtO_EXCLRRnR=R(RRRR((s#/usr/local/lib/python2.7/mailbox.pyRs!!cCs:|j}t|dkr'd}nt|d}tjj|jt|}t|}t	}z|j
rt|nzy|j||WnGt
k
r|j
rt|nt|t}tj|nXt|tr|j||nWd|j
rt|nXWd|s5t|nX|S(s$Add message and return assigned key.iiN(R.RtmaxRRRjRRURR=RRRbRvRRxR>R!RIRt_dump_sequences(RRR.tnew_keyRRtclosed((s#/usr/local/lib/python2.7/mailbox.pyRs6		

	


	cCstjj|jt|}yt|d}Wn;tk
rn}|jtjkrht	d|qnX|j
tj|dS(s=Remove the keyed message; raise KeyError if it doesn't exist.srb+sNo message with key: %sN(RRRjRRURRRRR#RFR!(RR RRR((s#/usr/local/lib/python2.7/mailbox.pyR!s
cCstjj|jt|}yt|d}Wn;tk
rn}|jtjkrht	d|qonXz|j
rt|nzYtjtj|tj
tjB|j||t|tr|j||nWd|j
rt|nXWdt|XdS(s>Replace the keyed message; raise KeyError if it doesn't exist.srb+sNo message with key: %sN(RRRjRRURRRRR#RRRFRtO_TRUNCRbRIRRRRx(RR RRRR((s#/usr/local/lib/python2.7/mailbox.pyR%s$	
#	cCs1y^|jr6ttjj|jt|d}n'ttjj|jt|d}Wn;tk
r}|jtj	krt
d|qnXzD|jrt|nzt|}Wd|jrt
|nXWd|jXx<|jjD](\}}||kr|j|qqW|S(s4Return a Message representation or raise a KeyError.sr+RsNo message with key: %sN(RRRRRjRRURRRR#RRRRFt
get_sequencesR3tadd_sequence(RR RRRRwtkey_list((s#/usr/local/lib/python2.7/mailbox.pyR)s(	*+	
	cCsy^|jr6ttjj|jt|d}n'ttjj|jt|d}Wn;tk
r}|jtj	krt
d|qnXzB|jrt|nz|jSWd|jrt
|nXWd|jXdS(s3Return a string representation or raise a KeyError.sr+RsNo message with key: %sN(RRRRRjRRURRRR#RRGRRF(RR RR((s#/usr/local/lib/python2.7/mailbox.pyR+s 	*+	
	cCssy+ttjj|jt|d}Wn;tk
rh}|jtjkrbt	d|qinXt
|S(s6Return a file-like representation or raise a KeyError.RsNo message with key: %s(RRRRjRRURRRR#R(RR RR((s#/usr/local/lib/python2.7/mailbox.pyR*s+cCs&ttdtj|jDS(sReturn an iterator over keys.css'|]}|jrt|VqdS(N(tisdigitR(t.0R((s#/usr/local/lib/python2.7/mailbox.pys	<genexpr>+s(titerRRRR(R((s#/usr/local/lib/python2.7/mailbox.pyR,)scCs(tjjtjj|jt|S(s9Return True if the keyed message exists, False otherwise.(RRRlRjRRU(RR ((s#/usr/local/lib/python2.7/mailbox.pyR5.scCstt|jS(s*Return a count of messages in the mailbox.(RR-R,(R((s#/usr/local/lib/python2.7/mailbox.pyR72scCsJ|jsFttjj|jdd|_t|jt|_ndS(sLock the mailbox.s
.mh_sequencessrb+N(	RRRRRjRRRR>(R((s#/usr/local/lib/python2.7/mailbox.pyRD6s	$
cCs9|jr5t|jt|j|`t|_ndS(s#Unlock the mailbox if it is locked.N(RRRRxR=(R((s#/usr/local/lib/python2.7/mailbox.pyRE=s
	

cCsdS(s&Write any pending changes to the disk.N((R((s#/usr/local/lib/python2.7/mailbox.pyRCEscCs|jr|jndS(sFlush and close the mailbox.N(RRE(R((s#/usr/local/lib/python2.7/mailbox.pyRFIs	cCs[g}xNtj|jD]:}tjjtjj|j|r|j|qqW|S(sReturn a list of folder names.(RRRRRRjR(RR9R((s#/usr/local/lib/python2.7/mailbox.pyRNs
$cCs+ttjj|j|d|jdtS(s+Return an MH instance for the named folder.RR(RRRRjRRR=(RR((s#/usr/local/lib/python2.7/mailbox.pyRVscCs%ttjj|j|d|jS(s:Create a folder and return an MH instance representing it.R(RRRRjRR(RR((s#/usr/local/lib/python2.7/mailbox.pyR[scCstjj|j|}tj|}|dgkrUtjtjj|dn"|gkrdntd|jtj|dS(s-Delete the named folder, which must be empty.s
.mh_sequencessFolder not empty: %sN(RRRjRRR!RR(RRRtentries((s#/usr/local/lib/python2.7/mailbox.pyR`scCsmi}ttjj|jdd}z4t|j}x|D]}y|jd\}}t}xo|jD]a}|jr|j	t
|qwd|jdD\}	}
|jt|	|
dqwWgt
|D]}||kr|^q||<t||dkr+||=nWqCtk
rUtd|jqCXqCWWd	|jX|S(
s=Return a name-to-key-list dictionary to define each sequence.s
.mh_sequencesRRfcss|]}t|VqdS(N(R(Rtx((s#/usr/local/lib/python2.7/mailbox.pys	<genexpr>zst-iis"Invalid sequence specification: %sN(RRRRjRtsetR.R}RRRRBtrangeRRt
ValueErrortFormatErrortrstripRF(RtresultsRtall_keysRaRwtcontentsR.tspecRRR ((s#/usr/local/lib/python2.7/mailbox.pyRls,!
	
cCsettjj|jdd}z2tjtj|jtjtjBx|j	D]\}}t
|dkr{qWn|jd|d
}t
}xtt|D]r}|d|kr|st}|jdqn7|rt
}|jd||fn|jd||}qW|rA|jt|d	qW|jd	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(RRRRjRRFRwRRR3RRRRVR=RRR>RURx(Rt	sequencesRRwR.tprevt
completingR ((s#/usr/local/lib/python2.7/mailbox.pyt
set_sequencess.!&
c	Cs|j}d}g}x|jD]}|d|kr|j||dfttdrtjtjj|jt	|tjj|jt	|dtj
tjj|jt	|qtjtjj|jt	|tjj|jt	|dn|d7}q%W|d|_t
|dkrEdSxS|jD]E\}}x6|D].\}}||kre|||j|<qeqeWqRW|j|dS(s?Re-name messages to eliminate numbering gaps. Invalidates keys.iiRtN(RR,RR<RRtRRjRRUtunlinkRRRR4tindexR!(	RRRtchangesR RwRtoldRh((s#/usr/local/lib/python2.7/mailbox.pytpacks*!#(!&
cCs|j}|j}xU|jD]G\}}||krM|j|q%||kr%||j|=q%q%Wx*|D]"}||krw|g||<qwqwW|j|dS(s;Inspect a new MHMessage and update sequences appropriately.N(RR3RR#R!(RRR tpending_sequencest
all_sequencesRwRtsequence((s#/usr/local/lib/python2.7/mailbox.pyRs
N(RcRdReRVR>RRR!R%R)R+R*R,R5R7RDRERCRFRRRRRR!R&R(((s#/usr/local/lib/python2.7/mailbox.pyRs.	"																			cBseZdZedZdedZd	Zd
Z	dZ
dZd
ZdZ
dZdZdZdZdZdZRS(sAn Rmail-style Babyl mailbox.tunseentdeletedtfiledtansweredt	forwardedteditedtresentcCs#tj||||i|_dS(sInitialize a Babyl mailbox.N(RRt_labels(RRRR((s#/usr/local/lib/python2.7/mailbox.pyRscCs;tj||}t|tr7|j|j|<n|S(s$Add message and return assigned key.(RRRIRt
get_labelsR1(RRR ((s#/usr/local/lib/python2.7/mailbox.pyRscCs0tj||||jkr,|j|=ndS(s=Remove the keyed message; raise KeyError if it doesn't exist.N(RR!R1(RR ((s#/usr/local/lib/python2.7/mailbox.pyR!scCs<tj|||t|tr8|j|j|<ndS(s>Replace the keyed message; raise KeyError if it doesn't exist.N(RR%RIRR2R1(RR R((s#/usr/local/lib/python2.7/mailbox.pyR%sc	Cs}|j|\}}|jj||jjtj}xXtr|jj}|dtjksu|dkryPn|j|j	tjdqAWtj}xTtr|jj}|tjks|dkrPn|j|j	tjdqW|jj
||jjj	tjd}t|j
|}|j|j
||jkry|j|j|n|S(s4Return a Message representation or raise a KeyError.s*** EOOH ***RHs
(RRRORWRKR>RRQRRRPRGRRtgetvaluetset_visibleR1t
set_labels(	RR RRtoriginal_headersRatvisible_headerstbodyR((s#/usr/local/lib/python2.7/mailbox.pyR)s,
	 	 %	cCs
|j|\}}|jj||jjtj}xXtr|jj}|dtjksu|dkryPn|j|j	tjdqAWx8tr|jj}|tjks|dkrPqqW|j
|jj||jjj	tjdS(s3Return a string representation or raise a KeyError.s*** EOOH ***RHs
(
RRRORWRKR>RRQRRRPR3RGR(RR RRR6Ra((s#/usr/local/lib/python2.7/mailbox.pyR+s 
	 		%cCs%tj|j|jdtjS(s6Return a file-like representation or raise a KeyError.s
(RKR+RPRRQ(RR ((s#/usr/local/lib/python2.7/mailbox.pyR*scCsT|jt}x$|jjD]}|j|q#W|j|jt|S(s4Return a list of user-defined labels in the mailbox.(RRR1R2RBtdifference_updatet_special_labelsR-(Rtlabelst
label_list((s#/usr/local/lib/python2.7/mailbox.pyR2s
	c	Csgg}}|jjdd}g}x[tr|}|jj}|jj}|dtjkrt|t|kr|j|ttjn|j|g|jjdj	dD]$}|j
dkr|j
^q}|j|q,|dks!|dtjkrYt|t|kr|j|ttjqq,|dkr,|j|ttjPq,q,Wttt
|||_tt||_t|j|_|jjdd|jj|_dS(	s0Generate key-to-(start, stop) table of contents.isit,RHsiN(RROR>RWRRRQRRR}tstripRRRRoR1RR(	RRRRtlabel_listsRRatlabelR;((s#/usr/local/lib/python2.7/mailbox.pyR$s6
	
 $ cCs9|jdtjtjdj|jtjfdS(s,Called before writing the mailbox to file f.s(BABYL OPTIONS:%sVersion: 5%sLabels:%s%sR=N(RRRRQRjR2(RR((s#/usr/local/lib/python2.7/mailbox.pyRBs	cCs|jdtjdS(s-Called before writing each message to file f.sN(RRRRQ(RR((s#/usr/local/lib/python2.7/mailbox.pyRHscCs|jtjddS(s,Called after writing each message to file f.sN(RRRRQ(RR((s#/usr/local/lib/python2.7/mailbox.pyRLscCs,|jj}t|trg}g}x@|jD]2}||jkr\|j|q7|j|q7W|jjdx"|D]}|jjd|qW|jjdx&|D]}|jjd|dqW|jjtj	n|jjdtj	t|t
jjrt
j
}t
jj|td}|j||jdxQtr|j}|jj|jdtj	|dks|d	kr^Pq^q^W|jjd
tj	t|trct
j
}	t
jj|	td}
|
j|jxtr_|	j}|jj|jdtj	|dksX|d	krPqqWna|jdxQtr|j}|jj|jdtj	|dks|d	krsPqsqsWxLtr|jd}|d	krPn|jj|jdtj	qWnt|tr|jdd
}|d
dkr|jj|| jdtj	|jjd
tj	|jj|| jdtj	|jj||jdtj	q|jjd
tj	tj	|jj|jdtj	nt|dr|j}
t}xtr|j}|jj|jdtj	|dkst|d	kr+|rt}|jjd
tj	|j|
qPq+q+Wxatr|jd}|d	krPn|jj|jdtj	qWntdt||jj}||fS(s0Write message contents and return (start, stop).t1s, s,,t R=s1,,is
RHs*** EOOH ***is

iiRWsInvalid message type: %s(RRRIRR2R:RRRRRQRJRRRKRLRMR=RNROR>RWRPtget_visibleRGRURR<RYRZ(RRRtspecial_labelsR;R@torig_buffertorig_generatorRat
vis_buffert
vis_generatorR]t
body_starttoriginal_post
first_passR((s#/usr/local/lib/python2.7/mailbox.pyRPs



		
		&

"		&(R*R+R,R-R.R/R0N(RcRdRet	frozensetR:RVR>RRR!R%R)R+R*R2RRRRR(((s#/usr/local/lib/python2.7/mailbox.pyRs 													cBs,eZdZddZdZdZRS(s0Message with mailbox-format-specific properties.cCst|tjjrM|jtj|t|tr|j|qnt|tru|jtj	|n`t
|dr|jtj|n8|dkrtjjj
|ntdt|dS(sInitialize a Message instance.RGsInvalid message type: %sN(RIRJRRt_become_messagetcopytdeepcopyt_explain_toRUtmessage_from_stringR<tmessage_from_fileRVRRYRZ(RR((s#/usr/local/lib/python2.7/mailbox.pyRscCs)x"d
D]}|j||j|<qWd	S(s0Assume the non-format-specific state of message.t_headerst	_unixfromt_payloadt_charsettpreambletepiloguetdefectst
_default_typeN(RSRTRURVRWRXRYRZ(t__dict__(RRRw((s#/usr/local/lib/python2.7/mailbox.pyRMs
cCs#t|trdStddS(s:Copy format-specific state to message insofar as possible.Ns Cannot convert to specified type(RIRRY(RR((s#/usr/local/lib/python2.7/mailbox.pyRPsN(RcRdReRVRRMRP(((s#/usr/local/lib/python2.7/mailbox.pyRs	cBs}eZdZd
dZdZdZdZdZdZ	dZ
dZd	Zd
Z
dZdZRS(s)Message with Maildir-specific properties.cCs5d|_d|_tj|_tj||dS(s%Initialize a MaildirMessage instance.RhRHN(t_subdirt_infoRt_dateRR(RR((s#/usr/local/lib/python2.7/mailbox.pyRs		cCs|jS(sReturn 'new' or 'cur'.(R\(R((s#/usr/local/lib/python2.7/mailbox.pyRyscCs8|dks|dkr$||_ntd|dS(sSet subdir to 'new' or 'cur'.RhRis!subdir must be 'new' or 'cur': %sN(R\R(RR((s#/usr/local/lib/python2.7/mailbox.pyRscCs%|jjdr|jdSdSdS(s*Return as a string the flags that are set.s2,iRHN(R]RX(R((s#/usr/local/lib/python2.7/mailbox.pyt	get_flagsscCs ddjt||_dS(s)Set the given flags and unset all others.s2,RHN(RjRR](Rtflags((s#/usr/local/lib/python2.7/mailbox.pyt	set_flagsscCs0|jdjt|jt|BdS(s.Set the given flag(s) without changing others.RHN(RaRjRR_(Rtflag((s#/usr/local/lib/python2.7/mailbox.pytadd_flagscCsE|jdkrA|jdjt|jt|ndS(s7Unset the given string flag(s) without changing others.RHN(R_RaRjR(RRb((s#/usr/local/lib/python2.7/mailbox.pytremove_flagscCs|jS(s<Return delivery date of message, in seconds since the epoch.(R^(R((s#/usr/local/lib/python2.7/mailbox.pyRscCs;yt||_Wn!tk
r6td|nXdS(s9Set delivery date of message, in seconds since the epoch.scan't convert to float: %sN(tfloatR^RRY(Rtdate((s#/usr/local/lib/python2.7/mailbox.pyRs
cCs|jS(s%Get the message's "info" as a string.(R](R((s#/usr/local/lib/python2.7/mailbox.pyR{scCs5t|tr||_ntdt|dS(s Set the message's "info" string.sinfo must be a string: %sN(RIRUR]RYRZ(Rtinfo((s#/usr/local/lib/python2.7/mailbox.pyRscCsXt|trK|j|j|j|j|j|jn	t|tr t	|j}d|kr|j
dn|jdkr|j
dnd|kr|j
dnd|kr|j
dnd|kr|j
dn|jd	tj
|jn4t|trt	|j}d|kr]|jd
nd|kry|jdnd|krT|jdqTnt|tr,t	|j}d|kr|jd
nd|kr|jd
nd|kr
|jdnd|krT|jdqTn(t|tr>ntdt|dS(s;Copy Maildir-specific state to message insofar as possible.tStRRitOtTtDtFtAs
MAILER-DAEMONR*trepliedtflaggedR+R-tPR.s$Cannot convert to specified type: %sN(RIR	RaR_RRyRRRRRcRRRRR
Rt	add_labelRRYRZ(RRR`((s#/usr/local/lib/python2.7/mailbox.pyRPsN"N(RcRdReRVRRyRR_RaRcRdRRR{RRP(((s#/usr/local/lib/python2.7/mailbox.pyR	s										RcBs\eZdZd	dZdZd	dZdZdZdZ	dZ
dZRS(
s/Message with mbox- or MMDF-specific properties.cCsw|jdtt|tjjrc|j}|dk	rc|jdrc|j|dqcntj	||dS(s'Initialize an mboxMMDFMessage instance.s
MAILER-DAEMONsFrom iN(
RR>RIRJRRRRVRXR(RRtunixfrom((s#/usr/local/lib/python2.7/mailbox.pyR7scCs|jS(s Return contents of "From " line.(t_from(R((s#/usr/local/lib/python2.7/mailbox.pyR@scCsN|dk	rA|tkr'tj}n|dtj|7}n||_dS(s>Set "From " line, formatting and appending time_ if specified.RBN(RVR>RRRRt(RRttime_((s#/usr/local/lib/python2.7/mailbox.pyRDs
cCs |jdd|jddS(s*Return as a string the flags that are set.tStatusRHsX-Status(R((R((s#/usr/local/lib/python2.7/mailbox.pyR_LscCst|}d
\}}x4dD],}||kr||7}|j|qqWx4dD],}||krV||7}|j|qVqVW|djt|7}y|jd|Wn!tk
r|jd|nXy|jd|Wn!tk
r|jd|nXd	S(
s)Set the given flags and unset all others.RHRiRjRlRmRnRvsX-StatusN(RHRH(RiRj(RlRmRn(RR!RjRtreplace_headerR#t
add_header(RR`tstatus_flagst
xstatus_flagsRb((s#/usr/local/lib/python2.7/mailbox.pyRaPs&





cCs0|jdjt|jt|BdS(s.Set the given flag(s) without changing others.RHN(RaRjRR_(RRb((s#/usr/local/lib/python2.7/mailbox.pyRcfscCsKd|ksd|krG|jdjt|jt|ndS(s7Unset the given string flag(s) without changing others.RvsX-StatusRHN(RaRjRR_(RRb((s#/usr/local/lib/python2.7/mailbox.pyRdjscCst|trt|j}d|kr=|jdnd|krY|jdnd|kru|jdnd|kr|jdnd|kr|jdn|d	=|d
=dj|jjd}y&|j	t
jtj
|d
Wqttfk
rqXnlt|trU|j|j|j|jn4t|trt|j}d|kr|jdnd|kr|jdnd|kr|jdn|d	=|d
=nt|trat|j}d|kr|jdnd|kr4|jdnd|krP|jdn|d	=|d
=n(t|trsntdt|dS(sACopy mbox- or MMDF-specific state to message insofar as possible.RjRiRmRnRiRhRlRktstatussx-statusRBis%a %b %d %H:%M:%S %YR*RoRpR+R-s$Cannot convert to specified type: %sN(RIR	RR_RRcRjRR}RtcalendarttimegmRtstrptimeRt
OverflowErrorRRaRRR
RRrRRYRZ(RRR`t
maybe_date((s#/usr/local/lib/python2.7/mailbox.pyRPos^

N(RcRdReRVRRRR_RaRcRdRP(((s#/usr/local/lib/python2.7/mailbox.pyR4s						cBseZdZRS(s&Message with mbox-specific properties.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyR
scBsGeZdZddZdZdZdZdZdZ	RS(s$Message with MH-specific properties.cCsg|_tj||dS(s!Initialize an MHMessage instance.N(t
_sequencesRR(RR((s#/usr/local/lib/python2.7/mailbox.pyRs	cCs|jS(s4Return a list of sequences that include the message.(R(R((s#/usr/local/lib/python2.7/mailbox.pyRscCst||_dS(s3Set the list of sequences that include the message.N(R-R(RR((s#/usr/local/lib/python2.7/mailbox.pyR!scCsNt|tr4||jkrJ|jj|qJntdt|dS(s8Add sequence to list of sequences including the message.ssequence must be a string: %sN(RIRURRRYRZ(RR)((s#/usr/local/lib/python2.7/mailbox.pyR
scCs,y|jj|Wntk
r'nXdS(sARemove sequence from the list of sequences including the message.N(RR!R(RR)((s#/usr/local/lib/python2.7/mailbox.pytremove_sequences
cCst|trt|j}d|kr=|jdn|jd|jdd|krs|jdnd|kr|jdqn?t|trt|j}d|kr|jdn
|jd	d|kr|jdnd|kr|jd
qnt|trMx|jD]}|j|q3Wnt|t	rt|j}d|kr|j
dnd|kr|j
dqn(t|trntdt
|d
S(s6Copy MH-specific state to message insofar as possible.R*RiRhRpRmRoRitRORjRnR-s$Cannot convert to specified type: %sN(RIR	RRRRcRRR
RRrRRYRZ(RRRR)((s#/usr/local/lib/python2.7/mailbox.pyRPs@


N(
RcRdReRVRRR!R
RRP(((s#/usr/local/lib/python2.7/mailbox.pyRs				cBsbeZdZd
dZdZdZdZdZdZ	dZ
dZd	ZRS(s'Message with Babyl-specific properties.cCs)g|_t|_tj||dS(s#Initialize a BabylMessage instance.N(R1Rt_visibleR(RR((s#/usr/local/lib/python2.7/mailbox.pyRs	cCs|jS(s'Return a list of labels on the message.(R1(R((s#/usr/local/lib/python2.7/mailbox.pyR2scCst||_dS(s&Set the list of labels on the message.N(R-R1(RR;((s#/usr/local/lib/python2.7/mailbox.pyR5scCsNt|tr4||jkrJ|jj|qJntdt|dS(s+Add label to list of labels on the message.slabel must be a string: %sN(RIRUR1RRYRZ(RR@((s#/usr/local/lib/python2.7/mailbox.pyRrscCs,y|jj|Wntk
r'nXdS(s4Remove label from the list of labels on the message.N(R1R!R(RR@((s#/usr/local/lib/python2.7/mailbox.pytremove_labels
cCs
t|jS(s3Return a Message representation of visible headers.(RR(R((s#/usr/local/lib/python2.7/mailbox.pyRC
scCst||_dS(s2Set the Message representation of visible headers.N(RR(Rtvisible((s#/usr/local/lib/python2.7/mailbox.pyR4scCsxG|jjD]6}||kr<|jj|||q|j|=qWx=dD]5}||krQ||jkrQ|||j|<qQqQWdS(	s9Update and/or sensibly generate a set of visible headers.tDatetFromsReply-TotTotCCtSubjectN(RRsReply-ToRRR(RR.Rw(Rtheader((s#/usr/local/lib/python2.7/mailbox.pytupdate_visibles
cCst|trt|j}d|kr=|jdn|jd|jdd|ksod|kr|jdnd|kr|jdnd	|kr|jd
qnRt|tr?t|j}d|kr|jdn
|jdd	|kr |jd
nd|kr|jdqnt|trt|j}d|kr||jdnd|kr|jdqnqt|t	r|j
|jxL|jD]}|j|qWn(t|t
rntdt|dS(s9Copy Babyl-specific state to message insofar as possible.R*RiRhR.R0RqR-RiR+RkRRjRlRnRos$Cannot convert to specified type: %sN(RIR	RR2RRcRRR
RR4RCRrRRYRZ(RRR;R@((s#/usr/local/lib/python2.7/mailbox.pyRP sF


N(
RcRdReRVRR2R5RrRRCR4RRP(((s#/usr/local/lib/python2.7/mailbox.pyRs							cBseZdZRS(s&Message with MMDF-specific properties.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyR
JsRcBsneZdZddZddZddZddZdZdZ	ddZ
d	Zd
ZRS(sA read-only wrapper of a file.cCs4||_|dkr'|j|_n	||_dS(sInitialize a _ProxyFile.N(RRVRt_pos(RRtpos((s#/usr/local/lib/python2.7/mailbox.pyRQs	cCs|j||jjS(sRead bytes.(t_readRRG(Rtsize((s#/usr/local/lib/python2.7/mailbox.pyRGYscCs|j||jjS(sRead a line.(RRRW(RR((s#/usr/local/lib/python2.7/mailbox.pyRW]scCsWg}xJ|D]B}|j||dk	r
|t|8}|dkrOPqOq
q
W|S(sRead multiple lines.iN(RRVR(RtsizehintR9Ra((s#/usr/local/lib/python2.7/mailbox.pyt	readlinesas

cCst|jdS(sIterate over lines.RH(RRW(R((s#/usr/local/lib/python2.7/mailbox.pyR1lscCs|jS(sReturn the position.(R(R((s#/usr/local/lib/python2.7/mailbox.pyRpsicCsK|dkr"|jj|jn|jj|||jj|_dS(sChange position.iN(RRORR(Rtoffsettwhence((s#/usr/local/lib/python2.7/mailbox.pyROtscCs>t|dr:t|jdr1|jjn|`ndS(sClose the file.RRFN(R<RRF(R((s#/usr/local/lib/python2.7/mailbox.pyRF{scCsJ|dkrd}n|jj|j||}|jj|_|S(s"Read size bytes using read_method.iN(RVRRORR(RRtread_methodR9((s#/usr/local/lib/python2.7/mailbox.pyRs	N(
RcRdReRVRRGRWRR1RRORFR(((s#/usr/local/lib/python2.7/mailbox.pyRNs			RcBsDeZdZdddZdZddZdZdZRS(s&A read-only wrapper of part of a file.cCs)tj|||||_||_dS(sInitialize a _PartialFile.N(RRt_startt_stop(RRRR((s#/usr/local/lib/python2.7/mailbox.pyRs	cCstj||jS(s*Return the position with respect to start.(RRR(R((s#/usr/local/lib/python2.7/mailbox.pyRsicCsY|dkr!|j|_d}n!|dkrB|j|_d}ntj|||dS(s8Change position, possibly with respect to start or stop.iiiN(RRRRRO(RRR((s#/usr/local/lib/python2.7/mailbox.pyROs		cCs`|j|j}|dkr dS|dksD|dksD||krM|}ntj|||S(s;Read size bytes using read_method, honoring start and stop.iRHN(RRRVRR(RRRt	remaining((s#/usr/local/lib/python2.7/mailbox.pyRs$	cCst|dr|`ndS(NR(R<R(R((s#/usr/local/lib/python2.7/mailbox.pyRFsN(	RcRdReRVRRRORRF(((s#/usr/local/lib/python2.7/mailbox.pyRs	
		cCst}ytrytj|tjtjBWqtk
r|}|jtjtjtj	fkrvt
d|jq}qXn|ry!t|jd}|j
Wn5tk
r}|jtjtj	fkrdSnXyfttdr$tj|j|jdt}tj|jn tj|j|jdt}Wqtk
r}|jtjkstjdkr|jtjkrtj|jt
d|jqqXnWnCtrtj|tjn|rtj|jdnnXdS(s(Lock file f using lockf and dot locking.slockf: lock unavailable: %ss.lockNRtRsdot lock unavailable: %s(R=tfcntltlockftLOCK_EXtLOCK_NBRRtEAGAINRRRRwRRFR<RRtR>R"RRRR!tLOCK_UN(RRtdotlock_doneRtpre_lock((s#/usr/local/lib/python2.7/mailbox.pyRsL!

!cCsPtrtj|tjntjj|jdrLtj|jdndS(s*Unlock file f using lockf and dot locking.s.lockN(RRRRRRlRwR!(R((s#/usr/local/lib/python2.7/mailbox.pyRscCsLtj|tjtjBtjBd}zt|dSWdtj|XdS(sCCreate a file if it doesn't exist and open for reading and writing.isrb+N(RRRRtO_RDWRRF(Rtfd((s#/usr/local/lib/python2.7/mailbox.pyRs&cCs2td|ttjtjtjfS(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.7/mailbox.pyRs	cCs3|jttdr/tj|jndS(s0Ensure changes to file f are physically on disk.tfsyncN(RCR<RRtfileno(R((s#/usr/local/lib/python2.7/mailbox.pyRs
cCst||jdS(s:Close file f, ensuring all changes are physically on disk.N(RRF(R((s#/usr/local/lib/python2.7/mailbox.pyRxs
t_MailboxcBs)eZejdZdZdZRS(cCs||_d|_||_dS(Ni(tfptseekpR(RRR((s#/usr/local/lib/python2.7/mailbox.pyRs		cCst|jdS(N(RRRV(R((s#/usr/local/lib/python2.7/mailbox.pyR1scCsx|jj|jy|jWn$tk
rJ|jj|_dSX|jj}|j|jj|_}||krPqqW|jt	|j||S(N(
RRORt
_search_starttEOFErrorRRVt_search_endRR(RRR((s#/usr/local/lib/python2.7/mailbox.pyRs

(RcRdRRRR1R(((s#/usr/local/lib/python2.7/mailbox.pyRs	cBs>eZdZdZdZdZdZdZeZ	RS(cCskxd|jj}|jj}|s0tn|d dkr|j|r|jj|dSqWdS(NisFrom (RRRWRt_isrealfromlineRO(RRRa((s#/usr/local/lib/python2.7/mailbox.pyR!s	cCss|jjx_|jj}|jj}|s8dS|d dkr|j|r|jj|dSqWdS(NisFrom (RRWRRRO(RRRa((s#/usr/local/lib/python2.7/mailbox.pyR+s
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=|js-ddl}|j|j|_n|jj|S(Ni(t_regexptretcompilet_fromlinepatterntmatch(RRaR((s#/usr/local/lib/python2.7/mailbox.pyt_strict_isrealfromlineUs	cCstS(N(R>(RRa((s#/usr/local/lib/python2.7/mailbox.pyt_portable_isrealfromline[sN(
RcRdRRRRVRRRR(((s#/usr/local/lib/python2.7/mailbox.pyRs	
	$		cBseZejZRS((RcRdRRR(((s#/usr/local/lib/python2.7/mailbox.pyRascBseZdZdZRS(cCs=x6|jj}|s!tn|d dkrdSqWdS(Nis
(RRWR(RRa((s#/usr/local/lib/python2.7/mailbox.pyRgs	cCsSxL|jj}|jj}|s+dS|dkr|jj|dSqWdS(Ns
(RRRWRO(RRRa((s#/usr/local/lib/python2.7/mailbox.pyRos(RcRdRR(((s#/usr/local/lib/python2.7/mailbox.pyRes	cBs)eZejdZdZdZRS(cCsddl}|jd}||_tj|j}t|j|}tt|}|j	tt
||_|jj||_
dS(Nis
^[1-9][0-9]*$(RRRsRRtfilterRtmaptlongtsortRUtboxestreverseR(RRsRRtpatR-((s#/usr/local/lib/python2.7/mailbox.pyR|s	

cCst|jdS(N(RRRV(R((s#/usr/local/lib/python2.7/mailbox.pyR1scCst|js
dS|jj}ttjj|j|}|j|}y
||_	Wnt
tfk
ronX|S(N(RRVR:RRRRjRsRt	_mh_msgnotAttributeErrorRY(RtfnRR((s#/usr/local/lib/python2.7/mailbox.pyRs	
(RcRdRRRR1R(((s#/usr/local/lib/python2.7/mailbox.pyRzs	cBseZdZdZRS(cCs9x2|jj}|s!tn|dkrdSqWdS(Ns
*** EOOH ***
(RRWR(RRa((s#/usr/local/lib/python2.7/mailbox.pyRs	cCs_xX|jj}|jj}|s+dS|dksC|dkr|jj|dSqWdS(Ns
s(RRRWRO(RRRa((s#/usr/local/lib/python2.7/mailbox.pyRs(RcRdRR(((s#/usr/local/lib/python2.7/mailbox.pyRs	tErrorcBseZdZRS(s"Raised for module-specific errors.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyRsRncBseZdZRS(s:The specified mailbox does not exist and won't be created.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyRnsRcBseZdZRS(s>The specified mailbox is not empty and deletion was requested.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyRsRcBseZdZRS(s)Another process caused an action to fail.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyRsRcBseZdZRS(s)A file appears to have an invalid format.(RcRdRe(((s#/usr/local/lib/python2.7/mailbox.pyRs(<RetsysRRR|RRRNRJt
email.messagetemail.generatorRKtplatformtImportErrorRRVtwarningstcatch_warningstpy3kwarningtfilterwarningstDeprecationWarningRt__all__RRRRRRRRRRR	RR
RRR
RRR>RRRRRRxRRRRRRt	ExceptionRRnRRR(((s#/usr/local/lib/python2.7/mailbox.pyt<module>s~	


	
	C84-8 koF]>'-					
B"

Zerion Mini Shell 1.0