Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/multifile.pyo |
³ò h”Rc @ s? d Z d d g Z d e f d „ ƒ YZ d d d „ ƒ YZ d 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. t MultiFilet Errorc B s e Z RS( ( t __name__t __module__( ( ( s% /usr/local/lib/python2.5/multifile.pyR s c B s€ e Z d Z d d „ Z d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( i i c C sW | | _ g | _ d | _ d | _ | o( d | _ | i i ƒ | _ g | _ n d S( Ni i ( t fpt stackt levelt lastt seekablet tellt startt posstack( t selfR R ( ( s% /usr/local/lib/python2.5/multifile.pyt __init__' s c C s/ | i d j o | i Sn | i i ƒ | i S( Ni ( R t lastposR R R ( R ( ( s% /usr/local/lib/python2.5/multifile.pyR 1 s c C sæ | i ƒ } | oZ | d j o | | } qm | d j o. | i d j o | | i } qi t d ‚ qm n d | j o | j n p | i d j o | | i j o t d ‚ n | i i | | i ƒ d | _ d | _ d S( Ni i i s can't use whence=2 yets bad MultiFile.seek() call( R R R R R t seekR R ( R t post whencet here( ( s% /usr/local/lib/python2.5/multifile.pyR 6 s c C s\ | i d j o d Sn | i i ƒ } | pC t | i ƒ | _ | i d j | _ | i o t d ‚ n d Sn | i | ƒ o | Sn | i ƒ } xo t t | i ƒ ƒ D]T \ } } | | i | ƒ j o d | _ Pq« | | i | ƒ j o d | _ Pq« q« W| S| i o | i ƒ t | ƒ | _ n | d | _ | i d j o t d ‚ n d S( Ni t s"