Ńň §ÚęLc@skdZdddgZddkZddklZd„Zed„Zd dd „Z dd ed „Z dS( s1Various types of useful iterators and generators.tbody_line_iteratorttyped_subpart_iteratortwalki˙˙˙˙N(tStringIOccsM|V|iƒo7x4|iƒD]"}x|iƒD] }|Vq2WqWndS(s‰Walk over the message tree, yielding each subpart. The walk is performed in depth-first order. This method is a generator. N(t is_multipartt get_payloadR(tselftsubpartt subsubpart((s'/usr/lib64/python2.6/email/iterators.pyRs   ccs]xV|iƒD]H}|id|ƒ}t|tƒo xt|ƒD] }|VqBWq q WdS(sŽIterate over the parts, returning string payloads line-by-line. Optional decode (default False) is passed through to .get_payload(). tdecodeN(RRt isinstancet basestringR(tmsgR Rtpayloadtline((s'/usr/lib64/python2.6/email/iterators.pyR#s  ttextccs[xT|iƒD]F}|iƒ|jo-|djp|iƒ|jo |VqSq q WdS(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(Rtget_content_maintypetNonetget_content_subtype(R tmaintypetsubtypeR((s'/usr/lib64/python2.6/email/iterators.pyR/s   icCs˘|djo ti}nd|d}|||iƒI|o|d|iƒIJn|J|iƒo2x/|iƒD]}t|||d|ƒqyWndS(sA handy debugging aidt is[%s]iN(Rtsyststdouttget_content_typetget_default_typeRRt _structure(R tfptleveltinclude_defaultttabR((s'/usr/lib64/python2.6/email/iterators.pyR=s    ( t__doc__t__all__Rt cStringIORRtFalseRRRR(((s'/usr/lib64/python2.6/email/iterators.pyts