Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
proc
/
self
/
root
/
usr
/
lib
/
python2.4
/
email
/
Upload File :
New :
File
Dir
//proc/self/root/proc/self/root/usr/lib/python2.4/email/Iterators.pyc
mò =5Dc @ sV d Z d k Z d k l Z d Z e d Z d d d Z d d e d Z d S( s1 Various types of useful iterators and generators.N( s StringIOc c sK | V| i o6 x3 | i D]! } x | i D] } | Vq1 Wq Wn d S( s Walk over the message tree, yielding each subpart. The walk is performed in depth-first order. This method is a generator. N( t selft is_multipartt get_payloadt subpartt walkt subsubpart( R R R ( ( t% /usr/lib/python2.4/email/Iterators.pyR s c c s\ xU | i D]G } | i d | } t | t o x t | D] } | VqB Wq q Wd S( s Iterate over the parts, returning string payloads line-by-line. Optional decode (default False) is passed through to .get_payload(). t decodeN( t msgR R R R t payloadt isinstancet basestringt StringIOt line( R R R R R ( ( R t body_line_iterator s t textc c sZ xS | i D]E } | i | j o, | d j p | i | j o | VqR q q Wd S( sø Iterate over the subparts with a given MIME type. Use `maintype' as the main MIME type to match against; this defaults to "text". Optional `subtype' is the MIME subtype to match against; if omitted, only the main type is matched. N( R R R t get_content_maintypet maintypet subtypet Nonet get_content_subtype( R R R R ( ( R t typed_subpart_iterator) s i c C s¢ | d j o t i } n d | d } | | | i I| o | d | i IJn | J| i o2 x/ | i D] } t | | | d | qy Wn d S( s A handy debugging aidt i s [%s]i N( t fpR t syst stdoutt levelt tabR t get_content_typet include_defaultt get_default_typeR R R t _structure( R R R R R R ( ( R R 7 s ( t __doc__R t cStringIOR R t FalseR R R R ( R R R R R R ( ( R t ? s