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/multifile.pyc
Size5.35 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:28
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sedZddklZededd�[ddgZdefd��YZdd d ��YZd
S( 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.
iÿÿÿÿ(twarns9the multifile module has been deprecated since Python 2.5t
stacklevelit MultiFiletErrorcBseZRS((t__name__t
__module__(((s!/usr/lib64/python2.6/multifile.pyR$scBs�eZdZdd�Zd�Zdd�Zd�Zd�Zd�Zd�Z d �Z
d
�Z d �Z d �Z
d
�ZRS(iicCsW||_g|_d|_d|_|o(d|_|ii�|_g|_ndS(Nii(tfptstacktleveltlasttseekablettelltstarttposstack(tselfRR
((s!/usr/lib64/python2.6/multifile.pyt__init__+s     cCs,|idjo|iS|ii�|iS(Ni(RtlastposRR R (R((s!/usr/lib64/python2.6/multifile.pyR 5scCsæ|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(R RRRRtseekR R (Rtpostwhencethere((s!/usr/lib64/python2.6/multifile.pyR:s 

 
 cCsj|idjodS|ii�}|p@t|i�|_|idj|_|io
td�ndS|idjpt�|i|�o|S|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()(RRtreadlinetlenRR RtAssertionErrortis_datatrstript enumeratetreversedtsection_dividert
end_markerR
R R(Rtlinetmarkertitsep((s!/usr/lib64/python2.6/multifile.pyRKs8

     


cCs5g}x(|i�}|pPn|i|�q |S(N(Rtappend(RtlistR((s!/usr/lib64/python2.6/multifile.pyt readlinesps cCsdi|i��S(NR(tjoinR%(R((s!/usr/lib64/python2.6/multifile.pytreadxscCsjx|i�oqW|idjp
|iodSd|_d|_|io|ii�|_ndS(Nii(RRR R
RR R (R((s!/usr/lib64/python2.6/multifile.pytnext{s
  
cCsd|idjo
td�n|ii|�|io)|ii|i�|ii�|_ndS(Nisbad MultiFile.push() call( RRRR#R
R
R RR (RR"((s!/usr/lib64/python2.6/multifile.pytpush�s 

cCs¸|igjo
td�n|idjo
d|_n|i|i}td|id�|_|ii�|io:|i i�|_|idjo||i|_q´ndS(Nsbad MultiFile.pop() callii(
RRRR RR tmaxtpopR
R
(Rt
abslastpos((s!/usr/lib64/python2.6/multifile.pyR+�s



cCs|d djS(Nis--((RR((s!/usr/lib64/python2.6/multifile.pyR�scCsd|S(Ns--((Rtstr((s!/usr/lib64/python2.6/multifile.pyR�scCs d|dS(Ns--((RR-((s!/usr/lib64/python2.6/multifile.pyR¡s(RRR
RR RRR%R'R(R)R+RRR(((s!/usr/lib64/python2.6/multifile.pyR's
  %  
   N((t__doc__twarningsRtDeprecationWarningt__all__t ExceptionRR(((s!/usr/lib64/python2.6/multifile.pyt<module>s