Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβthe ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβembodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.
Current path: lib64/python2.7/
β Cloned to:
β¬οΈ Go up: /lib64
οΏ½
zfc @ se d Z d d l m Z e d e d d οΏ½[ 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.
iοΏ½οΏ½οΏ½οΏ½( t warns9 the multifile module has been deprecated since Python 2.5t
stackleveli t MultiFilet Errorc B s e Z RS( ( t __name__t
__module__( ( ( s! /usr/lib64/python2.7/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 sU | | _ g | _ d | _ d | _ | rQ d | _ | j j οΏ½ | _ g | _ n d S( Ni i ( t fpt stackt levelt lastt seekablet tellt startt posstack( t selfR R
( ( s! /usr/lib64/python2.7/multifile.pyt __init__+ s c C s* | j d k r | j S| j j οΏ½ | j S( Ni ( R t lastposR R R ( R ( ( s! /usr/lib64/python2.7/multifile.pyR 5 s c C sοΏ½ | j οΏ½ } | re | d k r+ | | } qe | d k re | j d k rV | | j } qb t d οΏ½ qe n d | k o| | k n sοΏ½ | j d k rοΏ½ | | j k rοΏ½ t d οΏ½ n | j j | | j οΏ½ 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/lib64/python2.7/multifile.pyR : s
c C sC | j d k r d S| j j οΏ½ } | se t | j οΏ½ | _ | j d k | _ | j ra t d οΏ½ n d S| j | οΏ½ rx | S| j οΏ½ } xk t t
| j οΏ½ οΏ½ D]P \ } } | | j | οΏ½ k rοΏ½ d | _ PqοΏ½ | | j | οΏ½ k rοΏ½ d | _ PqοΏ½ qοΏ½ W| S| j
r| j οΏ½ t | οΏ½ | _ n | d | _ | j d k r?t d οΏ½ n d S( Ni t s"