GIF89a=( �' 7IAXKgNgYvYx\%wh&h}t�h%�s%x�}9�R��&�0%� (�.��5�SD��&�a)�x5��;ͣ*ȡ&ղ)ׯ7׵<ѻ4�3�H֧KͯT��Y�aq��q��F� !� ' !� NETSCAPE2.0 , =( ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g���E�������R���E����B�� ��ȸ��D���"�Ů� �H��L��D٫D�B�����D���T���H �G��A R�ڐ |�� ٭&��E8�S�kG�A�px�a��� R2XB��E8I���6X�:vT)�~��q�賥��"F~%x� � 4#Z�0O|-4Bs�X:= Q� Sal��yXJ`GȦ|s h��K3l7�B|�$'7Jީܪ0!��D�n=�P� ����0`�R�lj����v>���5 �.69�ϸd�����nlv�9��f{���Pbx �l5}�p� ��� �3a���I�O����!ܾ���i��9��#��)p�a ޽ �{�)vm��%D~ 6f��s}Œ�D�W E�`!� �&L8x� �ܝ{)x`X/>�}m��R�*|`D�=�_ ^�5 !_&'a�O�7�c��`DCx`�¥�9�Y�F���`?��"� �n@`�} lď��@4>�d S �v�xN��"@~d��=�g�s~G��� ���ud &p8Q�)ƫlXD����A~H�ySun�j���k*D�LH�] ��C"J��Xb~ʪwSt}6K,��q�S:9ت:���l�@�`�� �.۬�t9�S�[:��=`9N����{¿�A !R�:���6��x�0�_ �;������^���#����!����U���;0L1�����p% A��U̬ݵ��%�S��!���~`�G���� ���=4�np�3���������u�u�ٮ|%2�I��r�#0��J``8�@S@5� ���^`8E�]�.�S���7 � �0�j S�D� z���i�S�����!���l��w9*�D�I�nEX��� &A�Go�Qf��F��;���}�J����F5��Q|���X��T��y���]� o ��C=��:���PB@ D׽S�(>�C�x}`��xJЬ�۠��p+eE0`�}`A �/NE�� �9@��� H�7�!%B0`�l*��!8 2�%� �:�1�0E��ux%nP1�!�C)�P81l�ɸF#Ƭ{����B0>�� �b�`��O3��()yRpb��E.ZD8�H@% �Rx+%���c� ���f��b�d�`F�"8�XH"��-�|1�6iI, 2�$+](A*j� QT�o0.�U�`�R�}`�SN����yae�����b��o~ S)�y�@��3 �tT�0�&�+~L�f"�-|�~��>!�v��~�\Q1)}@�}h#aP72�"�$ !� " , =( &7IAXG]KgNgYvYxR"k\%w]'}h}t�h%�g+�s%r.m3ax3�x�}9��&��+�!7�0%� (�.�SD��&��;�"&ײ)׻4��6�K� �@pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E �� �������E �´��C���ǶR��D��"Ʒ�ʱH��M��GڬD�B����D��T����G���C�C� l&�~:'�tU�6ɹ#��)�'�.6�&��Ȼ K(8p0N�?!�2"��NIJX>R��OM '��2�*x�>#n� �@<[:�I�f ��T���Cdb��[�}E�5MBo��@�`@��tW-3 �x�B���jI�&E�9[T&$��ﯧ&"s��ȳ����dc�UUρ#���ldj?����`\}���u|3'�R]�6 �S#�!�FKL�*N E���`$�:e�YD�q�.�촁�s \-�jA 9�����-��M[�x(�s��x�|���p��}k�T�DpE@W� ��]k`1� ���Yb ��0l��*n0��"~zBd�~u�7�0Bl��0-�x~|U�U0 �h�*HS�|��e"#"?vp�i`e6^�+q��`m8 #V�� ��VS|`��"m"сSn|@:U���~`pb�G�ED����2F�I�? >�x� R� ��%~jx��<�a�9ij�2�D��&: Z`�]w���:�6��B�7eFJ|�ҧ�,���FǮcS�ʶ+B�,�ܺN���>PAD�HD��~���n��}�#�� Q��S���2�X�{�k�lQ�2�����w�|2� h9��G�,m���3��6-��E�L��I�³*K���q�`DwV�QXS��peS��� qܧTS����R�u �<�a�*At�lmE� � ��N[P1�ۦ��$��@`��Dpy�yXvCAy�B`}D� 0QwG#� �a[^�� $���Ǧ{L�"[��K�g�;�S~��GX.�goT.��ư��x���?1z��x~:�g�|�L� ��S`��0S]P�^p F<""�?!,�!N4&P� ����:T�@h�9%t��:�-~�I<`�9p I&.)^ 40D#p@�j4�ج:�01��rܼF2oW�#Z ;$Q q  �K��Nl#29 !F@�Bh�ᏬL!XF�LHKh�.�hE&J�G��<"WN!�����Y@� >R~19J"�2,/ &.GXB%�R�9B6�W]���W�I�$��9�RE8Y� ��"�A5�Q.axB�&ة�J�! �t)K%tS-�JF b�NMxL��)�R��"���6O!TH�H� 0 !� ) , =( &AXKgNgYvYxR"k\%wh&h}h%�g+�s%r.x3�x�}9��&��+�R,�!7�0%� (�.��5��&�a)��;�"&ף*Ȳ)ׯ7׻4�3��6�H֧KͻH�T��Y��q��h� ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E$����� � ����$E$��"��D� � ������R��C��� E ��H�M��G�D� �B��ϾD��a��`1r��Ӑ�� �o~�zU!L�C'�yW�UGt����ll�0���uG�)A�s[��x� �xO%��X2�  P�n:R/��aHae+�Dm?# ǣ6�8�J�x�Di�M���j���5oQ7�- <! *�l��R2r/a!l)d� A"�E���� &� ;��c �%����b��pe~C"B���H�eF2��`8qb�t_`ur`e� w�u3��Pv�h""�`�Íx�LĹ��3� �~ֺ�:���MDfJ� �۵�W�%�S�X �؁)�@��:E��w�u�Sxb8y\m�zS��Zb�E�L��w!y(>�"w�=�|��s�d �C�W)H�cC$�L �7r.�\{)@�`@ �X�$PD `aaG:���O�72E�amn]�"Rc�x�R� &dR8`g��i�xLR!�P &d����T���i�|�_ � Qi�#�`g:��:noM� :V �)p����W&a=�e�k� j���1߲s�x�W�jal|0��B0�, \j۴:6���C ��W��|��9���zĸV {�;��n��V�m�I��.��PN� ����C��+��By�ѾHŸ:��� 7�Y�FTk�SaoaY$D�S���29R�kt� ��f� ��:��Sp�3�I��DZ� �9���g��u�*3)O��[_hv ,���Et x�BH� �[��64M@�S�M7d�l�ܶ5-��U܍��z�R3Ԭ3~ ��P��5�g: ���kN�&0�j4���#{��3S�2�K�'ợl���2K{� {۶?~m𸧠�I�nE�='����^���_�=��~�#O���'���o..�Y�n��CSO��a��K��o,���b�����{�C�� "�{�K ��w��Ozdը�:$ ���v�] A#� ���a�z)Rx׿ƥ�d``�w-�y�f�K!����|��P��=�`�(f��'Pa ��BJa%��f�%`�}F����6>��`G"�}�=�!o`�^FP�ةQ�C���`(�}\�ݮ ��$<��n@dĠE#��U�I�!� #l��9`k���'Rr��Z�NB�MF �[�+9���-�wj���8�r� ,V�h"�|�S=�G_��"E� 0i*%̲��da0mVk�):;&6p>�jK ��# �D�:�c?:R Ӭf��I-�"�<�="��7�3S��c2RW ,�8(T"P0F¡Jh�" ; 403WebShell
403Webshell
Server IP : 81.88.48.95  /  Your IP : 10.2.217.94, 216.73.216.227
Web Server : Apache
System : Linux opus09 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64
User : nobody ( 99)
PHP Version : 5.3.3-7+squeeze3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python2.6/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/mhlib.pyc
Mc@s~dZddklZeddd[dZdZdZd	Zdd
kZdd
kZdd
k	Z	dd
k
Z
dd
kZdd
kZddk
l
Z
dd
ddgZd
efdYZdfdYZe	idZdZdfdYZde
ifdYZdefdYZdfdYZddZddZdZedjoend
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_sequencesiN(tbisecttMHtErrortFoldertMessagecBseZRS((t__name__t
__module__(((s/usr/lib/python2.6/mhlib.pyR[scBseZdZdddZdZdZdZdZdZ	dZ
dZd	Zd
Z
dZdZd
ZdZRS(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
tdn||_dS(sConstructor.tPathit~sMH() path not foundN(tNonet
MH_PROFILEtostpatht
expandusertprofilet
getprofiletPATHtisabstjointisdirR(tselfRR((s/usr/lib/python2.6/mhlib.pyt__init__fs



%
cCsd|i|ifS(sString representation.s
MH(%r, %r)(RR(R((s/usr/lib/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/lib/python2.6/mhlib.pyterrorvscCst|i|S(s*Return a profile entry, None if not found.(tpicklineR(Rtkey((s/usr/lib/python2.6/mhlib.pyRzscCs|iS(s9Return the path (the name of the collection's directory).(R(R((s/usr/lib/python2.6/mhlib.pytgetpath~scCs9ttii|idd}|p
d}n|S(s&Return the name of the current folder.tcontextsCurrent-Foldertinbox(RR
RRR!(RR"((s/usr/lib/python2.6/mhlib.pyt
getcontexts
	
cCsItii|id}t|d}|id||idS(s#Set the name of the current folder.R"twsCurrent-Folder: %s
N(R
RRR!topenRtclose(RR"tfntf((s/usr/lib/python2.6/mhlib.pyt
setcontextscCssg}|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/lib/python2.6/mhlib.pytlistfolderss
c	Cstii|i|}ti|i}|djogSg}ti|}xx|D]p}tii||}tii|oBtii||}|i||d}|djoPqqXqXW|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
subfolderstsubnamestsubnametfullsubnametname_subname((s/usr/lib/python2.6/mhlib.pytlistsubfolderss"





cCs
|idS(s<Return the names of all folders and subfolders, recursively.t(tlistallsubfolders(R((s/usr/lib/python2.6/mhlib.pytlistallfolderssc
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/lib/python2.6/mhlib.pyR<s.

	



cCs
t||S(s0Return a new Folder object for the named folder.(R(RR/((s/usr/lib/python2.6/mhlib.pyt
openfolderscCsht|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/lib/python2.6/mhlib.pyt
makefolders
cCstii|i|}xgti|D]V}tii||}yti|Wq+tij
o|id|q+Xq+Wti|dS(sDelete 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/lib/python2.6/mhlib.pytdeletefolders	N(RRt__doc__RRRRRR!R$R*R1R:R=R<RBRHRK(((s/usr/lib/python2.6/mhlib.pyR_s													s
^[1-9][0-9]*$cCsti|dj	S(N(tnumericprogtmatchR(tstr((s/usr/lib/python2.6/mhlib.pyR?scBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZddZdZdZdZdZdZdZdZRS(s'Class representing a particular folder.cCs@||_||_tii|iptd|ndS(sConstructor.sno folder %sN(tmhR/R
RRtgetfullnameR(RRPR/((s/usr/lib/python2.6/mhlib.pyRs		cCsd|i|ifS(sString representation.sFolder(%r, %r)(RPR/(R((s/usr/lib/python2.6/mhlib.pyRscGs|ii|dS(sError message handler.N(RPR(RR((s/usr/lib/python2.6/mhlib.pyRscCstii|ii|iS(s'Return the full pathname of the folder.(R
RRRPR/(R((s/usr/lib/python2.6/mhlib.pyRQscCstii|itS(s8Return the full pathname of the folder's sequences file.(R
RRRQtMH_SEQUENCES(R((s/usr/lib/python2.6/mhlib.pytgetsequencesfilenamescCstii|it|S(s4Return the full pathname of a message in the folder.(R
RRRQRO(Rtn((s/usr/lib/python2.6/mhlib.pytgetmessagefilenamescCs|ii|iS(s!Return list of direct subfolders.(RPR:R/(R((s/usr/lib/python2.6/mhlib.pyR:scCs|ii|iS(sReturn list of all subfolders.(RPR<R/(R((s/usr/lib/python2.6/mhlib.pyR<scCsg}ti}|i}x8ti|iD]!}||o||q.q.Wtt|}|i|o|d|_	n
d|_	|S(sReturn the list of messages currently present in the folder.
        As a side effect, set self.last to the last message (or 0).ii(
RMRNR,R
R+RQtmapRCR-tlast(RtmessagesRNR,R/((s/usr/lib/python2.6/mhlib.pytlistmessagess		

	cCsh}|i}yt|d}Wntj
o|SXx|i}|pPn|id}t|djo!|id||ifn|di}t|didi	}|||<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/lib/python2.6/mhlib.pytgetsequences)s$	
cCs|i}d}xm|iD]_\}}tdd}|i||pt|d}n|id||ifqW|p.yti	|Wqti
j
oqXn|idS(s.Write the set of sequences back to the folder.R;R\R%s%s: %s
N(RSRt	iteritemsRbtfromlistR&RttostringR
RIRR'(RRdR0R)R tseqts((s/usr/lib/python2.6/mhlib.pytputsequences=s

!	cCsG|i}yt|dSWn"ttfj
otdnXdS(s<Return the current message.  Raise Error when there is none.tcursno cur messageN(Rhtmaxt
ValueErrortKeyErrorR(Rtseqs((s/usr/lib/python2.6/mhlib.pyt
getcurrentNs
cCs#t|idt|ddS(sSet the current message.RoiN(t
updatelineRSRO(RRT((s/usr/lib/python2.6/mhlib.pyt
setcurrentVscCsv|i}|ptd|in|djo|S|id}|djo|| d||d}}}|d djo|d |d}}nt|ptd|nyt|}Wn%ttfj
ot|}nXy|i	||}Wntj
o}	|i
}
||
jo/|	pd|}	nt|	tid	n|
|}|ptd
|n|djo
||S|| Sq)X|p|djo
d}qn|djo(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(sParse 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/lib/python2.6/mhlib.pyt
parsesequenceZs|	

 














cCs`t|o2yt|SWq?ttfj
otiSXn|d
jo|iS|djo	|dS|djo	|dS|djoJ|i}t||}y||SWqtj
ot	dqXn|d	jol|i}t||d
}|djo
t	dny||d
SWqStj
ot	dqSXnt	ddS(s7Internal: parse a message number (or cur, first, etc.).Rot.tfirstiRWitnextsno next messageRyisno prev messageN(scurR(R?RCR{RqRtmaxintRtRt
IndexErrorRR(RRlRwRTR~((s/usr/lib/python2.6/mhlib.pyR|s8



	
	



cCs
t||S(s+Open a message -- returns a Message object.(R(RRT((s/usr/lib/python2.6/mhlib.pytopenmessagesc
Csg}g}x|D]}|i|}|idt|}yti|Wntij
onXyti||Wn%tij
o}|i|qX|i|qW|o|i|n|o=t|djoti|dqtid|fndS(s2Remove one or more messages -- may raise os.error.R>iismultiple errors:N(	RUROR
RIRtrenameR,tremovefromallsequencesR`(RtlistterrorstdeletedRTRt	commapathR((s/usr/lib/python2.6/mhlib.pytremovemessagess*icCsg}h}x|D]}|id}|i|}|i|}	yti||	Wntij
oy!ti||	ti|Wqttifj
oC}
|i	|
yti|	Wqtij
oqXqqXnX|i
||||<qW|o8|o|i||in|i
|in|o=t|djoti|dqtid|fndS(s_Refile one or more messages -- may raise os.error.
        'tofolder' is an open folder object.iismultiple errors:N(tgetlastRUR
RRtshutiltcopy2RIR]R,tsetlastt_copysequencestitemsRtkeysR`(RRttofoldert
keepsequencesRtrefiledRTttonRttopathR((s/usr/lib/python2.6/mhlib.pytrefilemessagess<


c	Cs|i}|i}d}x|iD]\}}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(RhRRrR,Rn(Rt
fromfoldertrefileditemst
fromsequencesttosequencestchangedR/RlttoseqtnewtfromnR((s/usr/lib/python2.6/mhlib.pyR
s(




c	Cs+|i|}t|}|i~|i|}|id|}yti||Wntij
onXyti||Wntij
ozd}z'|idti	||d}Wd|p.yti
|Wqtij
oqXnXti
|nX|i|gdS(saMove one message over a specific destination message,
        which may or may not already exist.s,%diiN(RUR&R'R
RRRRRRRIR(	RRTRRRR)Rtbackuptopathtok((s/usr/lib/python2.6/mhlib.pytmovemessage"s2



c	Cs|i|}t|}|i~|i|}|id|}yti||Wntij
onXd}z'|idti	||d}Wd|p.yti
|Wqtij
oqXnXdS(saCopy one message over a specific destination message,
        which may or may not already exist.s,%diiN(RUR&R'R
RRRRRRRI(	RRTRRRR)RRR((s/usr/lib/python2.6/mhlib.pytcopymessageBs(


c	Cs|i|}|id|}yti||Wntij
onXd}d}zQt|d}x+|i|}|pPn|i|qp|id}Wd|p.yti|Wqtij
oqXnXdS(	s3Create a message, with text from the open file txt.s,%diiiR%iNi@(	RUR
RRR&treadRR'RI(	RRTttxtRt
backuppathRtBUFSIZER)tbuf((s/usr/lib/python2.6/mhlib.pyt
createmessage\s,

cCst|do|i|jo
|`n|i}d}xu|iD]g\}}|djoqInxD|D]<}||jo)|i|d}|p||=qqpqpWqIW|o|i|ndS(s`Remove one or more messages from all sequences (including last)
        -- but not from 'cur'!!!RWiRoiN(thasattrRWRhRtremoveRn(RRRdRR/RlRT((s/usr/lib/python2.6/mhlib.pyRvs" 




cCs%t|dp|in|iS(sReturn the last message number.RW(RRYRW(R((s/usr/lib/python2.6/mhlib.pyRscCs8|djot|do
|`q4n
||_dS(sSet the last message number.RWN(RRRW(RRW((s/usr/lib/python2.6/mhlib.pyRs
(RRRLRRRRQRSRUR:R<RYRhRnRtRvRR|RRRRRRRRRR(((s/usr/lib/python2.6/mhlib.pyRs4														T			#		 				cBsGeZddZdZddZddZdZdZRS(cCsX||_||_|djo"|i|}t|d}ntii||dS(sConstructor.RZN(tfoldertnumberRRUR&t	mimetoolsRR(RR)RTtfpR((s/usr/lib/python2.6/mhlib.pyRs		
cCsdt|i|ifS(sString representation.sMessage(%s, %s)(treprRR(R((s/usr/lib/python2.6/mhlib.pyRscCs|djodi|iSg}d}xt|iD]i}|dip:|id}|djo||| i}qn|o|i|q4q4Wdi|S(sReturn 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(RRtheaderstisspaceRztlowerR,(RtpredRthitReR~((s/usr/lib/python2.6/mhlib.pyt
getheadertexts


icCs|ii|i|i}|p
|djo|iiSyddkl}Wn#tj
oddkl}nX|}ti	|i|||i
S(sReturn 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;RRR(RtseektstartofbodytgetencodingRt	cStringIORtImportErrorRtdecodetgetvalue(RRtencodingRtoutput((s/usr/lib/python2.6/mhlib.pytgetbodytexts	cCs|idjo
tdn|id}|p
tdn|ii|iti|i}|i|g}xQ|i	oCd|i
dt|f}t|i
||}|i|q~W|i|S(sOnly 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(tgetmaintypeRtgetparamRRRt	multifilet	MultiFiletpushRRR`t
SubMessageRR,tpop(RtbdrytmftpartsRTtpart((s/usr/lib/python2.6/mhlib.pytgetbodypartss 




cCs,|idjo|iS|iSdS(s3Return body, either a string or a list of messages.RN(RRR(R((s/usr/lib/python2.6/mhlib.pytgetbodysN(	RRRRRRRRR(((s/usr/lib/python2.6/mhlib.pyRs			RcBs8eZdZdZddZdZdZRS(cCsmti|||||idjoti||_nti||_ti|dd|_dS(sConstructor.RRiN(RRRRtbodyRtbodyencoded(RR)RTR((s/usr/lib/python2.6/mhlib.pyRs
cCs.|i|i|i}}}d|||fS(sString representation.sSubMessage(%s, %s, %s)(RRR(RR)RTR((s/usr/lib/python2.6/mhlib.pyRsicCs7|p|iSt|itdjo|iSdS(NR;(RttypeR(RR((s/usr/lib/python2.6/mhlib.pyRscCs(t|itgjo|iSdS(N(RR(R((s/usr/lib/python2.6/mhlib.pyRscCs|iS(N(R(R((s/usr/lib/python2.6/mhlib.pyRs(RRRRRRR(((s/usr/lib/python2.6/mhlib.pyRs
	
		RbcBseZdZddddZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZRS(sClass 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(RtdataRR((s/usr/lib/python2.6/mhlib.pyRs
			cCs
g|_dS(N(R(R((s/usr/lib/python2.6/mhlib.pytreset scCst|i|iS(N(tcmpR(Rtother((s/usr/lib/python2.6/mhlib.pyt__cmp__#scCs
t|iS(N(thashR(R((s/usr/lib/python2.6/mhlib.pyt__hash__&scCsd|i|i|ifS(NsIntSet(%r, %r, %r)(RkRR(R((s/usr/lib/python2.6/mhlib.pyR)scCs|iid}x|t|ijow|i|d\}}|i|\}}||djo.|t||fg|i|d|d+q|d}qWdS(Ni(RR-R`Rp(RR~talotahitblotbhi((s/usr/lib/python2.6/mhlib.pyt	normalize,s
.cCsd}xs|iD]h\}}||jot|}nt||it|}|o||i|}q|}qW|S(NR;(RRRR(RRmtlothitt((s/usr/lib/python2.6/mhlib.pyRk7s


cCsAg}x4|iD])\}}t||d}||}qW|S(Ni(Rtrange(RtlRRtm((s/usr/lib/python2.6/mhlib.pyRc@s
cCs"x|D]}|i|qWdS(N(R,(RRR~((s/usr/lib/python2.6/mhlib.pyRjGscCst}|i|_|S(N(RbR(RR((s/usr/lib/python2.6/mhlib.pytcloneKs	
cCs|iddS(Ni(R(R((s/usr/lib/python2.6/mhlib.pytminPscCs|iddS(Ni(R(R((s/usr/lib/python2.6/mhlib.pyRpSscCsAx:|iD]/\}}||jo
|jnotSq
WtS(N(RtTruetFalse(RtxRR((s/usr/lib/python2.6/mhlib.pytcontainsVs

	cCs~xtt|iD]}|i|\}}||jo|d|jo||f|i|<n|ii|||f|djo_|d|i|ddjo?|i|dd|i|dfg|i|d|d+ndS||jodSqWt|id}|djo@|i|\}}|d|jo||f|i|<dSn|ii||fdS(Nii(RR`RtinsertR,(RRR~RR((s/usr/lib/python2.6/mhlib.pyR,[s(
--
	
	cCs6||jodS|ii||f|idS(N(RR,R(Rtxlotxhi((s/usr/lib/python2.6/mhlib.pytaddpairts
cCsg}x|i|iD]}g}x9|i|iD]%}|i}|it|q8Wt|djo|i|d|dfqt|djo4|d|djo|i|d|dfqtdqW|i||_|i	dS(Niiisbad data passed to IntSet(
R_RRRaR,RCR`RqRR(RRRRRtsubpRm((s/usr/lib/python2.6/mhlib.pyRys(
N(RRRLRRRRRRRRkRcRjRRRpRR,RR(((s/usr/lib/python2.6/mhlib.pyRbs"															icCsyt|d}Wntj
odSXti|d}ti||oti}x|i}|pPn|i|oZ|t	|d}x8|i}|p|di
oPn||}q|iSq\dS(NRZR[ii(R&R]Rtretescapetcompilet
IGNORECASER^RNR`RRa(tfileR tcasefoldR)tpattprogRettext((s/usr/lib/python2.6/mhlib.pyRs&
c
Csly)t|d}|i}|iWntj
o
g}nXti|d}ti||oti}|djo
d}nd||f}xyt	t
|D]G}	||	}
|i|
o'|djo||	=n|||	<PqqW|dj	o|i|n|d}t|d}x|D]}
|i
|
q7W|iti||dS(NRZs:(.*)
s%s: %s
R
R%(R&t	readlinesR'R]RRRRRRR`RNR,RR
R(RR RgRR)tlinesR	R
tnewlineR~Rettempfile((s/usr/lib/python2.6/mhlib.pyRus8




	


c	Cstidtad}|d|dddddd	d
g}x|D]}|d|fqRW|d|d
tida|d|d|dti}tddi|d<|GHti	||dx%t
|D]}|d|fqW|dti}ti|a|dx~d/D]v}y|d*|fWntj
o}d+G|GHnXti
d,|fi}tt|i}|Gd-GHqMW|d.dS(0Nsrm -rf $HOME/Mail/@testcSs|GHt|GHdS(N(teval(Rm((s/usr/lib/python2.6/mhlib.pytdossmh.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()RRWRoRRyRsfirst:3slast:3scur:3scur:-3sprev:3snext:3s1:3s1:-3s100:3s100:-3s10000:3s10000:-3Rwsf.parsesequence(%r)sError:spick %r 2>/dev/nulls<-- picksf.listmessages()(sfirstslastscurRsprevsnextsfirst:3slast:3scur:3scur:-3sprev:3snext:3s1:3s1:-3s100:3s100:-3s10000:3s10000:-3sall(R
tsystemRRPRBR)RhRbRcRntreversedR$RtpopenRRVRCR_(	RttestfoldersRRsR"RlRtstuffR((s/usr/lib/python2.6/mhlib.pyttestsV
		

		










t__main__(RLtwarningsRRRRRRDR
RRRRRRt__all__t	ExceptionRRRRMR?RRRRbRRuRR(((s/usr/lib/python2.6/mhlib.pyt<module>6s<	
	M"	*


Youez - 2016 - github.com/yon3zu
LinuXploit