b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/mhlib.pyo
Size33.34 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:27
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @s~dZddklZeddd�[dZdZdZd Zdd
kZdd
kZdd
k Z dd
k
Z
dd
k Z dd
k Z dd k
l
Z
d d
ddgZd
efd��YZd fd��YZe id�Zd�Zdfd��YZde
ifd��YZdefd��YZdfd��YZdd�Zdd�Zd�Zedjo e�nd
S(s� MH interface -- purely object-oriented (well, almost)

Executive summary:

import mhlib

mh = mhlib.MH() # use default mailbox directory and profile
mh = mhlib.MH(mailbox) # override mailbox location (default from profile)
mh = mhlib.MH(mailbox, profile) # override mailbox and profile

mh.error(format, ...) # print error message -- can be overridden
s = mh.getprofile(key) # profile entry (None if not set)
path = mh.getpath() # mailbox pathname
name = mh.getcontext() # name of current folder
mh.setcontext(name) # set name of current folder

list = mh.listfolders() # names of top-level folders
list = mh.listallfolders() # names of all folders, including subfolders
list = mh.listsubfolders(name) # direct subfolders of given folder
list = mh.listallsubfolders(name) # all subfolders of given folder

mh.makefolder(name) # create new folder
mh.deletefolder(name) # delete folder -- must have no subfolders

f = mh.openfolder(name) # new open folder object

f.error(format, ...) # same as mh.error(format, ...)
path = f.getfullname() # folder's full pathname
path = f.getsequencesfilename() # full pathname of folder's sequences file
path = f.getmessagefilename(n) # full pathname of message n in folder

list = f.listmessages() # list of messages in folder (as numbers)
n = f.getcurrent() # get current message
f.setcurrent(n) # set current message
list = f.parsesequence(seq) # parse msgs syntax into list of messages
n = f.getlast() # get last message (0 if no messagse)
f.setlast(n) # set last message (internal use only)

dict = f.getsequences() # dictionary of sequences in folder {name: list}
f.putsequences(dict) # write sequences back to folder

f.createmessage(n, fp) # add message from file f as number n
f.removemessages(list) # remove messages in list from folder
f.refilemessages(list, tofolder) # move messages in list to other folder
f.movemessage(n, tofolder, ton) # move one message to a given destination
f.copymessage(n, tofolder, ton) # copy one message to a given destination

m = f.openmessage(n) # new open message object (costs a file descriptor)
m is a derived class of mimetools.Message(rfc822.Message), with:
s = m.getheadertext() # text of message's headers
s = m.getheadertext(pred) # text of message's headers, filtered by pred
s = m.getbodytext() # text of message's body, decoded
s = m.getbodytext(0) # text of message's body, not decoded
iÿÿÿÿ(twarnpy3ksOthe mhlib module has been removed in Python 3.0; use the mailbox module insteadt
stacklevelis
~/.mh_profiles~/Mails
.mh_sequencesiÀN(tbisecttMHtErrortFoldertMessagecBseZRS((t__name__t
__module__(((s/usr/lib64/python2.6/mhlib.pyR[scBs�eZdZddd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d�Z d �Z d
�Z
d �Zd �Zd
�Zd�ZRS(s<Class representing a particular collection of folders.
Optional constructor arguments are the pathname for the directory
containing the collection, and the MH profile to use.
If either is omitted or empty a default is used; the default
directory is taken from the MH profile if it is specified there.cCsÚ|djo
t}ntii|�|_|djo|id�}n|p
t}ntii|� o*|ddjotii d|�}ntii|�}tii
|�p
t d�n||_dS(s Constructor.tPathit~sMH() path not foundN( tNonet
MH_PROFILEtostpatht
expandusertprofilet
getprofiletPATHtisabstjointisdirR(tselfRR((s/usr/lib64/python2.6/mhlib.pyt__init__fs



%
cCsd|i|ifS(sString representation.s
MH(%r, %r)(RR(R((s/usr/lib64/python2.6/mhlib.pyt__repr__rscGstiid||�dS(sARoutine to print an error. May be overridden by a derived class.s
MH error: %s
N(tsyststderrtwrite(Rtmsgtargs((s/usr/lib64/python2.6/mhlib.pyterrorvscCst|i|�S(s*Return a profile entry, None if not found.(tpicklineR(Rtkey((s/usr/lib64/python2.6/mhlib.pyRzscCs|iS(s9Return the path (the name of the collection's directory).(R(R((s/usr/lib64/python2.6/mhlib.pytgetpath~scCs9ttii|i�d�d�}|p
d}n|S(s&Return the name of the current folder.tcontextsCurrent-Foldertinbox(RR
RRR!(RR"((s/usr/lib64/python2.6/mhlib.pyt
getcontext�s
 
cCsItii|i�d�}t|d�}|id|�|i�dS(s#Set the name of the current folder.R"twsCurrent-Folder: %s
N(R
RRR!topenRtclose(RR"tfntf((s/usr/lib64/python2.6/mhlib.pyt
setcontext�scCssg}|i�}xPti|�D]?}tii||�}tii|�o|i|�q"q"W|i�|S(s*Return the names of the top-level folders.(R!R
tlistdirRRRtappendtsort(RtfoldersRtnametfullname((s/usr/lib64/python2.6/mhlib.pyt listfolders�s 
c CsÚtii|i|�}ti|�i}|djogSg}ti|�}xx|D]p}tii||�}tii|�oBtii||�}|i|�|d}|djoPqÈqXqXW|i�|S(scReturn the names of the subfolders in a given folder
(prefixed with the given folder name).ii( R
RRtstattst_nlinkR+RR,R-( RR/R0tnlinkst
subfolderstsubnamestsubnamet fullsubnamet name_subname((s/usr/lib64/python2.6/mhlib.pytlistsubfolders�s"





cCs
|id�S(s<Return the names of all folders and subfolders, recursively.t(tlistallsubfolders(R((s/usr/lib64/python2.6/mhlib.pytlistallfolders³sc
Cs/tii|i|�}ti|�i}|djogSg}ti|�}xÍ|D]Å}|ddjp
t|�oqXntii||�}tii|�ortii||�}|i|�tii |�p|i
|�} || }n|d}|djoPqqXqXW|i �|S(s>Return the names of subfolders in a given folder, recursively.iit,i( R
RRR2R3R+t isnumericRR,tislinkR<R-(
RR/R0R4R5R6R7R8R9t
subsubfolders((s/usr/lib64/python2.6/mhlib.pyR<·s.

 



cCs
t||�S(s0Return a new Folder object for the named folder.(R(RR/((s/usr/lib64/python2.6/mhlib.pyt
openfolderÓscCsht|id�}|o t|�ot|d�}nt}titii|i �|�|�dS(s@Create a new folder (or raise os.error if it cannot be created).sFolder-ProtectiN(
RRR?tinttFOLDER_PROTECTR
tmkdirRRR!(RR/tprotecttmode((s/usr/lib64/python2.6/mhlib.pyt
makefolder×s
cCs�tii|i�|�}xgti|�D]V}tii||�}yti|�Wq+tij
o|id|�q+Xq+Wti|�dS(s�Delete a folder. This removes files in the folder but not
subdirectories. Raise os.error if deleting the folder itself fails.s%s not deleted, continuing...N(R
RRR!R+tunlinkRtrmdir(RR/R0R7R8((s/usr/lib64/python2.6/mhlib.pyt deletefolderàs N(RRt__doc__R RRRRR!R$R*R1R:R=R<RBRHRK(((s/usr/lib64/python2.6/mhlib.pyR_s           s
^[1-9][0-9]*$cCsti|�dj S(N(t numericprogtmatchR (tstr((s/usr/lib64/python2.6/mhlib.pyR?ïscBsòeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Z d
�Z d �Z
d �Zd
�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(s'Class representing a particular folder.cCs@||_||_tii|i��ptd|�ndS(s Constructor.s no folder %sN(tmhR/R
RRt getfullnameR(RRPR/((s/usr/lib64/python2.6/mhlib.pyRõs  cCsd|i|ifS(sString representation.sFolder(%r, %r)(RPR/(R((s/usr/lib64/python2.6/mhlib.pyRüscGs|ii|�dS(sError message handler.N(RPR(RR((s/usr/lib64/python2.6/mhlib.pyRscCstii|ii|i�S(s'Return the full pathname of the folder.(R
RRRPR/(R((s/usr/lib64/python2.6/mhlib.pyRQscCstii|i�t�S(s8Return the full pathname of the folder's sequences file.(R
RRRQt MH_SEQUENCES(R((s/usr/lib64/python2.6/mhlib.pytgetsequencesfilenamescCstii|i�t|��S(s4Return the full pathname of a message in the folder.(R
RRRQRO(Rtn((s/usr/lib64/python2.6/mhlib.pytgetmessagefilename scCs|ii|i�S(s!Return list of direct subfolders.(RPR:R/(R((s/usr/lib64/python2.6/mhlib.pyR:scCs|ii|i�S(sReturn list of all subfolders.(RPR<R/(R((s/usr/lib64/python2.6/mhlib.pyR<scCs�g}ti}|i}x8ti|i��D]!}||�o||�q.q.Wtt|�}|i�|o|d|_ n
d|_ |S(s�Return the list of messages currently present in the folder.
As a side effect, set self.last to the last message (or 0).iÿÿÿÿi(
RMRNR,R
R+RQtmapRCR-tlast(RtmessagesRNR,R/((s/usr/lib64/python2.6/mhlib.pyt listmessagess  

 cCsÚh}|i�}yt|d�}Wntj
o|SXx�|i�}|pPn|id�}t|�djo!|id||i�f�n|di�}t|di�d�i �}|||<q?|S(s+Return the set of sequences for the folder.trt:isbad sequence in %s: %siit (
RSR&tIOErrortreadlinetsplittlenRtstriptIntSetttolist(Rt sequencesR0R)tlinetfieldsR tvalue((s/usr/lib64/python2.6/mhlib.pyt getsequences)s$   
cCsÅ|i�}d}xm|i�D]_\}}tdd�}|i|�|pt|d�}n|id||i�f�qW|p.yti |�WqÁti
j
oqÁXn |i �dS(s.Write the set of sequences back to the folder.R;R\R%s%s: %s
N( RSR t iteritemsRbtfromlistR&RttostringR
RIRR'(RRdR0R)R tseqts((s/usr/lib64/python2.6/mhlib.pyt putsequences=s 

! cCsG|i�}yt|d�SWn"ttfj
otd�nXdS(s<Return the current message. Raise Error when there is none.tcursno cur messageN(Rhtmaxt
ValueErrortKeyErrorR(Rtseqs((s/usr/lib64/python2.6/mhlib.pyt
getcurrentNs
 cCs#t|i�dt|�d�dS(sSet the current message.RoiN(t
updatelineRSRO(RRT((s/usr/lib64/python2.6/mhlib.pyt
setcurrentVscCsv|i�}|ptd|i�n|djo|S|id�}|djoÔ|| d||d}}}|d djo|d |d}}nt|�ptd|�nyt|�}Wn%ttfj
ot|�}nXy|i ||�}Wn�tj
o�} |i
�}
||
jo/| pd|} nt| t i �d �n|
|} | ptd
|�n|d jo
| | S| | Sq)X|p|djo
d }qÎn|d jo(t
||�}|td||�|!St
||d�}||||!Sn|id �}|djo||i || |�} |i ||d|�}
t
|| d�}t
||
�}|||!}|ptd|�n|Sy|i ||�}WnUtj
oI} |i
�}
||
jo"| pd|} nt| �n|
|SX||jo/t|�otd|�qrtd|�n|gSdS(säParse an MH sequence specification into a message list.
Attempt to mimic mh-sequence(5) as close as possible.
Also attempt to mimic observed behavior regarding which
conditions cause which error messages.sno messages in %stallR[iR;is-+sbad message list %sissequence %s emptyt-tprevRWsmessage %d doesn't exists
no %s messageN(Ryslast(RYRR/tfindR?RCRqt
OverflowErrorR`t _parseindexRhRtexc_infoRRp(RRlRwtitheadtdirttailtcounttanchorRRstmsgstbegintendtjRZRT((s/usr/lib64/python2.6/mhlib.pyt
parsesequenceZs| 

 
 








 




c Cs`t|�o2yt|�SWq?ttfj
o tiSXn|d
jo |i�S|djo |dS|djo |dS|djoJ|i�}t||�}y ||SWqÚtj
ot d�qÚXn|d jol|i�}t||d
�}|djo
t d �ny||d
SWqStj
ot d �qSXnt d �d S(s7Internal: parse a message number (or cur, first, etc.).Rot.tfirstiRWiÿÿÿÿtnextsno next messageRyisno prev messageN(scurR�( R?RCR{RqRtmaxintRtRt
IndexErrorRR (RRlRwRTR~((s/usr/lib64/python2.6/mhlib.pyR|®s8


 
 
 
  
 

cCs
t||�S(s+Open a message -- returns a Message object.(R(RRT((s/usr/lib64/python2.6/mhlib.pyt openmessageÍsc
Csg}g}x©|D]¡}|i|�}|idt|��}yti|�Wntij
onXyti||�Wn%tij
o}|i|�qX|i|�qW|o|i|�n|o=t|�djoti|d�qtid|f�ndS(s2Remove one or more messages -- may raise os.error.R>iismultiple errors:N( RUROR
RIRtrenameR,tremovefromallsequencesR`(RtlistterrorstdeletedRTRt commapathR((s/usr/lib64/python2.6/mhlib.pytremovemessagesÑs*ic Cs�g}h}xü|D]ô}|i�d}|i|�}|i|�} yti|| �Wn�tij
o�y!ti|| �ti|�Wqðttifj
oC}
|i |
�yti| �Wqtij
oqXqqðXnX|i
|�|||<qW|o8|o|i ||i ��n|i
|i��n|o=t|�djoti|d�q�tid|f�ndS(s_Refile one or more messages -- may raise os.error.
'tofolder' is an open folder object.iismultiple errors:N(tgetlastRUR
R�Rtshutiltcopy2RIR]R,tsetlastt_copysequencestitemsR�tkeysR`( RR�ttofoldert
keepsequencesR�trefiledRTttonRttopathR((s/usr/lib64/python2.6/mhlib.pytrefilemessagesês<


c Csä|i�}|i�}d}x§|i�D]�\}}y||}d} Wntj
og}d} nXx8|D]0\}
} |
|jo|i| �d}qtqtW| o|o|||<q+q+W|o|i|�ndS(s.Helper for refilemessages() to copy sequences.iiN(RhR�RrR,Rn( Rt
fromfoldert refileditemst
fromsequencest tosequencestchangedR/RlttoseqtnewtfromnR ((s/usr/lib64/python2.6/mhlib.pyR�
s(  


  

c Cs+|i|�}t|�}|i�~|i|�}|id|�}yti||�Wntij
onXyti||�Wn�tij
ozd}z'|id�ti ||�d}Wd|p.yti
|�Wqtij
oqXnXti
|�nX|i |g�dS(saMove one message over a specific destination message,
which may or may not already exist.s,%diiN( RUR&R'R
R�RR�R R�R�RIR�( RRTR�R RR)R¡t backuptopathtok((s/usr/lib64/python2.6/mhlib.pyt movemessage"s2 



c Csá|i|�}t|�}|i�~|i|�}|id|�}yti||�Wntij
onXd}z'|id�ti ||�d}Wd|p.yti
|�WqÜtij
oqÜXnXdS(saCopy one message over a specific destination message,
which may or may not already exist.s,%diiN( RUR&R'R
R�RR�R R�R�RI( RRTR�R RR)R¡R«R¬((s/usr/lib64/python2.6/mhlib.pyt copymessageBs( 


c Csé|i|�}|id|�}yti||�Wntij
onXd}d}zQt|d�}x+|i|�}|pPn|i|�qp|i�d}Wd|p.yti|�Wqätij
oqäXnXdS( s3Create a message, with text from the open file txt.s,%diiiR%iNi@( RUR
R�RR&treadRR'RI( RRTttxtRt
backuppathR¬tBUFSIZER)tbuf((s/usr/lib64/python2.6/mhlib.pyt
createmessage\s,

cCsÐt|d�o|i|jo
|`n|i�}d}xu|i�D]g\}}|djoqInxD|D]<}||jo)|i|�d}|p ||=q¬qpqpWqIW|o|i|�ndS(s`Remove one or more messages from all sequences (including last)
-- but not from 'cur'!!!RWiRoiN(thasattrRWRhR�tremoveRn(RR�RdR§R/RlRT((s/usr/lib64/python2.6/mhlib.pyR�vs" 
 



cCs%t|d�p|i�n|iS(sReturn the last message number.RW(RµRYRW(R((s/usr/lib64/python2.6/mhlib.pyR��scCs8|djot|d�o
|`q4n
||_dS(sSet the last message number.RWN(R RµRW(RRW((s/usr/lib64/python2.6/mhlib.pyR��s
(RRRLRRRRQRSRUR:R<RYRhRnRtRvR�R|R�R�R¢R�R­R®R´R�R�R�(((s/usr/lib64/python2.6/mhlib.pyRòs4              T    #     cBsGeZdd�Zd�Zdd�Zdd�Zd�Zd�ZRS(cCsX||_||_|djo"|i|�}t|d�}ntii||�dS(s Constructor.RZN(tfoldertnumberR RUR&t mimetoolsRR(RR)RTtfpR((s/usr/lib64/python2.6/mhlib.pyR�s   
cCsdt|i�|ifS(sString representation.sMessage(%s, %s)(treprR·R¸(R((s/usr/lib64/python2.6/mhlib.pyR¢scCs®|djodi|i�Sg}d}xt|iD]i}|di�p:|id�}|djo||| i��}q�n|o|i|�q4q4Wdi|�S(sáReturn the message's header text as a string. If an
argument is specified, it is used as a filter predicate to
decide which headers to return (its argument is the header
name converted to lower case).R;iR[N(R RtheaderstisspaceRztlowerR,(RtpredR¼thitReR~((s/usr/lib64/python2.6/mhlib.pyt
getheadertext¦s


icCs¥|ii|i�|i�}| p
|djo|ii�Syddkl}Wn#tj
oddkl}nX|�}ti |i||�|i
�S(sßReturn the message's body text as string. This undoes a
Content-Transfer-Encoding, but does not interpret other MIME
features (e.g. multipart messages). To suppress decoding,
pass 0 as an argument.R;t7bitt8bittbinaryiÿÿÿÿ(tStringIO(R;RÂRÃRÄ( Rºtseekt startofbodyt getencodingR¯t cStringIORÅt ImportErrorR¹tdecodetgetvalue(RRËtencodingRÅtoutput((s/usr/lib64/python2.6/mhlib.pyt getbodytext·s  cCsÝ|i�djo
td�n|id�}|p
td�n|ii|i�ti|i�}|i|�g}xQ|i �oCd|i
dt |�f}t |i
||�}|i|�q~W|i�|S(s¥Only for multipart messages: return the message's body as a
list of SubMessage objects. Each submessage object behaves
(almost) as a Message object.t multipartsContent-Type is not multipart/*tboundarys"multipart/* without boundary params%s.%ri(t getmaintypeRtgetparamRºRÆRÇt multifilet MultiFiletpushR�R¸R`t
SubMessageR·R,tpop(RtbdrytmftpartsRTtpart((s/usr/lib64/python2.6/mhlib.pyt getbodypartsÈs 




cCs,|i�djo |i�S|i�SdS(s3Return body, either a string or a list of messages.RÐN(RÒRÝRÏ(R((s/usr/lib64/python2.6/mhlib.pytgetbodyÜs N( RRR RRRÁRÏRÝRÞ(((s/usr/lib64/python2.6/mhlib.pyR�s     R×cBs8eZd�Zd�Zdd�Zd�Zd�ZRS(cCsmti||||�|i�djoti|�|_nti|�|_ti|dd�|_dS(s Constructor.RÐRËiN(RRRÒRÝtbodyRÏt bodyencoded(RR)RTRº((s/usr/lib64/python2.6/mhlib.pyRæs
cCs.|i|i|i}}}d|||fS(sString representation.sSubMessage(%s, %s, %s)(R·R¸Rº(RR)RTRº((s/usr/lib64/python2.6/mhlib.pyRðsicCs7|p|iSt|i�td�jo|iSdS(NR;(RàttypeRß(RRË((s/usr/lib64/python2.6/mhlib.pyRÏõscCs(t|i�tg�jo|iSdS(N(RáRß(R((s/usr/lib64/python2.6/mhlib.pyRÝûscCs|iS(N(Rß(R((s/usr/lib64/python2.6/mhlib.pyRÞÿs(RRRRRÏRÝRÞ(((s/usr/lib64/python2.6/mhlib.pyR×äs

  RbcBs§eZdZdddd�Zd�Zd�Zd�Zd�Zd�Z d �Z
d
�Z d �Z d �Z
d
�Zd�Zd�Zd�Zd�Zd�ZRS(s÷Class implementing sets of integers.

This is an efficient representation for sets consisting of several
continuous ranges, e.g. 1-100,200-400,402-1000 is represented
internally as a list of three pairs: [(1,100), (200,400),
(402,1000)]. The internal representation is always kept normalized.

The constructor has up to three arguments:
- the string used to initialize the set (default ''),
- the separator between ranges (default ',')
- the separator between begin and end of a range (default '-')
The separators must be strings (not regexprs) and should be different.

The tostring() function yields a string that can be passed to another
IntSet constructor; __repr__() is a valid IntSet constructor itself.
R>RxcCs7g|_||_||_|o|i|�ndS(N(tpairstseptrngt
fromstring(RtdataRãRä((s/usr/lib64/python2.6/mhlib.pyRs
   cCs
g|_dS(N(Râ(R((s/usr/lib64/python2.6/mhlib.pytreset scCst|i|i�S(N(tcmpRâ(Rtother((s/usr/lib64/python2.6/mhlib.pyt__cmp__#scCs
t|i�S(N(thashRâ(R((s/usr/lib64/python2.6/mhlib.pyt__hash__&scCsd|i�|i|ifS(NsIntSet(%r, %r, %r)(RkRãRä(R((s/usr/lib64/python2.6/mhlib.pyR)scCs¨|ii�d}x�|t|i�jow|i|d\}}|i|\}}||djo.|t||�fg|i|d|d+q|d}qWdS(Ni(RâR-R`Rp(RR~talotahitblotbhi((s/usr/lib64/python2.6/mhlib.pyt normalize,s
.cCs�d}xs|iD]h\}}||jot|�}nt|�|it|�}|o||i|}q|}qW|S(NR;(RâR»RäRã(RRmtlothitt((s/usr/lib64/python2.6/mhlib.pyRk7s


cCsAg}x4|iD])\}}t||d�}||}qW|S(Ni(Râtrange(RtlRòRótm((s/usr/lib64/python2.6/mhlib.pyRc@s 
cCs"x|D]}|i|�qWdS(N(R,(RR�R~((s/usr/lib64/python2.6/mhlib.pyRjGscCst�}|i|_|S(N(RbRâ(RR©((s/usr/lib64/python2.6/mhlib.pytcloneKs 
cCs|iddS(Ni(Râ(R((s/usr/lib64/python2.6/mhlib.pytminPscCs|iddS(Niÿÿÿÿ(Râ(R((s/usr/lib64/python2.6/mhlib.pyRpSscCsAx:|iD]/\}}||jo
|jnotSq
WtS(N(RâtTruetFalse(RtxRòRó((s/usr/lib64/python2.6/mhlib.pytcontainsVs

 cCs~xtt|i��D]ê}|i|\}}||jo²|d|jo||f|i|<n|ii|||f�|djo_|d|i|ddjo?|i|dd|i|dfg|i|d|d+ndS||jodSqWt|i�d}|djo@|i|\}}|d|jo||f|i|<dSn|ii||f�dS(Nii(RõR`RâtinsertR,(RRüR~RòRó((s/usr/lib64/python2.6/mhlib.pyR,[s(
--
 
 cCs6||jodS|ii||f�|i�dS(N(RâR,Rñ(Rtxlotxhi((s/usr/lib64/python2.6/mhlib.pytaddpairts
cCsg}xÞ|i|i�D]Ê}g}x9|i|i�D]%}|i�}|it|��q8Wt|�djo|i|d|df�qt|�djo4|d|djo|i|d|df�qtd�qW|i||_|i �dS(Niiisbad data passed to IntSet(
R_RãRäRaR,RCR`RqRâRñ(RRæR©RÜR�tsubpRm((s/usr/lib64/python2.6/mhlib.pyRåys (
N(RRRLR RRçRêRìRRñRkRcRjRøRùRpRýR,RRå(((s/usr/lib64/python2.6/mhlib.pyRbs"            icCsåyt|d�}Wntj
odSXti|�d}ti||oti�}x�|i�}|pPn|i|�oZ|t |�d}x8|i�}| p|di
� oPn||}q�|i �Sq\dS(NRZR[ii( R&R]R tretescapetcompilet
IGNORECASER^RNR`R½Ra(tfileR tcasefoldR)tpattprogRettext((s/usr/lib64/python2.6/mhlib.pyR�s&  
c
Csly)t|d�}|i�}|i�Wntj
o
g}nXti|�d}ti||oti�}|djo
d}nd||f}xyt t
|��D]G} || }
|i |
�o'|djo || =n ||| <Pq®q®W|dj o|i |�n|d} t| d�}x|D]}
|i
|
�q7W|i�ti| |�dS(NRZs:(.*)
s%s: %s
R
R%(R&t readlinesR'R]RRRRR RõR`RNR,RR
R�( RR RgRR)tlinesR R
tnewlineR~Rettempfile((s/usr/lib64/python2.6/mhlib.pyRu s8  



 
 


c CsÕtid�t�ad�}|d�|d�ddddd d
g}x|D]}|d |f�qRW|d �|d
�tid�a|d�|d�|d�ti�}tdd�i�|d<|GHti |�|d�x%t
|�D]}|d|f�qüW|d�ti �}ti|�a|d�x~d/D]v}y|d*|f�Wnt j
o}d+G|GHnXti
d,|f�i�}tt|i��}|Gd-GHqMW|d.�dS(0Nsrm -rf $HOME/Mail/@testcSs|GHt|�GHdS(N(teval(Rm((s/usr/lib64/python2.6/mhlib.pytdoÆssmh.listfolders()smh.listallfolders()s@tests @test/test1s @test/test2s@test/test1/test11s@test/test1/test12s@test/test1/test11/test111smh.makefolder(%r)smh.listsubfolders('@test')smh.listallsubfolders('@test')sf.listsubfolders()sf.listallsubfolders()sf.getsequences()s
1-10 12-20R\tfoosmh.deletefolder(%r)smh.getcontext()sf.getcurrent()R�RWRoR�RyR�sfirst:3slast:3scur:3scur:-3sprev:3snext:3s1:3s1:-3s100:3s100:-3s10000:3s10000:-3Rwsf.parsesequence(%r)sError:spick %r 2>/dev/nulls<-- picksf.listmessages()(sfirstslastscurR�sprevsnextsfirst:3slast:3scur:3scur:-3sprev:3snext:3s1:3s1:-3s100:3s100:-3s10000:3s10000:-3sall(R
tsystemRRPRBR)RhRbRcRntreversedR$RtpopenR¯RVRCR_( Rt testfoldersRôRsR"RlRtstuffR�((s/usr/lib64/python2.6/mhlib.pyttestÂsV
  

  




 



 

t__main__(RLtwarningsRR RRRRDR
RRR¹RÔR�Rt__all__t ExceptionRRRRMR?RRR×RbRRuRR(((s/usr/lib64/python2.6/mhlib.pyt<module>6s< 
      � ÿ¦M�  " *