MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/self/root/usr/lib/python2.4/multifile.pyo
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/lib/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

?
	cCs\|idjodSn|iiƒ}|pCt|iƒ|_|idj|_|io
td‚ndSn|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	Rtis_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*RRR (((RR#s
		%			
				N(t__doc__t__all__t	ExceptionRR(RR-R((Rt?s