KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/multifile.pyc
mò
‚=5Dc@s?dZddgZdefd„ƒYZdfd„ƒYZdS(s­A readline()-style interface to the parts of a multipart message.

The MultiFile class makes each part of a multipart message "feel" like
an ordinary file, as long as you use fp.readline().  Allows recursive
use, for nested multipart messages.  Probably best used together
with module mimetools.

Suggested use:

real_fp = open(...)
fp = MultiFile(real_fp)

"read some lines from fp"
fp.push(separator)
while 1:
        "read lines from fp until it returns an empty string" (A)
        if not fp.next(): break
fp.pop()
"read remaining lines from fp until it returns an empty string"

The latter sequence may be used recursively at (A).
It is also allowed to use multiple push()...pop() sequences.

If seekable is given as 0, the class code will not do the bookkeeping
it normally attempts in order to make seeks relative to the beginning of the
current file part.  This may be useful when using MultiFile with a non-
seekable stream object.
t	MultiFiletErrorcBstZRS(N(t__name__t
__module__(((t!/usr/lib64/python2.4/multifile.pyR scBs€tZdZdd„Zd„Zdd„Zd„Zd„Zd„Zd	„Z	d
„Z
d„Zd„Zd
„Z
d„ZRS(NiicCsW||_g|_d|_d|_|o(d|_|iiƒ|_g|_ndS(Nii(	tfptselftstacktleveltlasttseekablettelltstarttposstack(RRR
((Rt__init__'s					cCs/|idjo|iSn|iiƒ|iS(Ni(RRtlastposRRR(R((RR1scCsæ|iƒ}|oZ|djo||}qm|djo.|idjo||i}qitd‚qmnd|jo
|jnp |idjo||ijo
td‚n|ii	||i
ƒd|_d|_dS(Niiiscan't use whence=2 yetsbad MultiFile.seek() call(RRtheretwhencetposRRRRtseekRR	(RRRR((RR6s

?
	cCss|idjodSn|iiƒ}|pCt|iƒ|_|idj|_|io
td‚ndSn|idjpt	‚|i
|ƒo|Sn
|iƒ}xot
t|iƒƒD]T\}}||i|ƒjod|_PqÂ||i|ƒjod|_PqÂqÂW|S|io|iƒt|ƒ|_n|d|_|idjo
td‚ndS(Nits"sudden EOF in MultiFile.readline()is)Missing endmarker in MultiFile.readline()(RRRtreadlinetlinetlenRR	RtAssertionErrortis_datatrstriptmarkert	enumeratetreversedtitseptsection_dividert
end_markerR
RR(RRRRR((RRGs8

			


cCs7g}x*|iƒ}|pPn|i|ƒq	W|S(Ni(tlistRRRtappend(RR"R((Rt	readlineslscCsdi|iƒƒS(NR(tjoinRR$(R((RtreadtscCsmx|iƒoqW|idjp
|iodSnd|_d|_|io|iiƒ|_ndS(Nii(RRRR	R
RRR(R((Rtnextws
		
cCsd|idjo
td‚n|ii|ƒ|io)|ii|iƒ|i	i
ƒ|_ndS(Nisbad MultiFile.push() call(RRRRR#RR
R
RRR(RR((Rtpushs

cCs¸|igjo
td‚n|idjo
d|_n|i|i}td|idƒ|_|ii	ƒ|i
o:|ii	ƒ|_|idjo||i|_q´ndS(Nsbad MultiFile.pop() callii(RRRRR	RRt
abslastpostmaxtpopR
R
(RR)((RR+‰s



cCs|d djS(Nis--(R(RR((RR—scCsd|S(Ns--(tstr(RR,((RR šscCsd|dS(Ns--(R,(RR,((RR!s(RRR
RRRRR$R&R'R(R+RR R!(((RR#s
		%			
				N(t__doc__t__all__t	ExceptionRR(RR.R((Rt?s

Anon7 - 2021