Your IP : 3.135.241.191
�
��f� c @ s d Z d d d d g Z d Z d Z d Z d Z y d d
l m Z m Z Wn e k
rj d Z d Z Yn Xd d � Z d
d � Z d d d � Z d d d d � Z d d d � Z d d d � Z d d � Z d d � Z d d � Z e d k r� e � n d S( uH Conversions to/from quoted-printable transport encoding as per RFC 1521.u encodeu decodeu encodestringu decodestrings =iL s 0123456789ABCDEFs i ( u a2b_qpu b2a_qpc C sG | d k r | S| d k r | S| t k pF d | k oC d k n S( u� Decide whether a particular byte ordinal needs to be quoted.
The 'quotetabs' flag indicates whether embedded tabs and spaces should be
quoted. Note that line-ending tabs and spaces are always encoded, as per
RFC 1521.
s s _s s ~( u ESCAPE( u cu quotetabsu header( ( u+ /opt/alt/python33/lib64/python3.3/quopri.pyu needsquoting s
u needsquotingc C s0 t | � } t t t | d t | d f � S( u Quote a single character.i ( u ordu ESCAPEu bytesu HEX( u c( ( u+ /opt/alt/python33/lib64/python3.3/quopri.pyu quote$ s u quotec
C s� t d k rA | j � } t | d | d | �} | j | � d S| d d d � } d } x=| j � } | sr Pn g } d }
| d
d � d k r� | d d � } d }
n xm | D]e } t | f � } t | | | � r� t | � } n | r| d k r| j d
� q� | j | � q� W| d k r6| | � n t j
| � } xH t | � t k r�| | d t d � d d �| t d d � } qHW| } q\ | d k r�| | d |
�n d S( u� Read 'input', apply quoted-printable encoding, and write to 'output'.
'input' and 'output' are files with readline() and write() methods.
The 'quotetabs' flag indicates whether embedded tabs and spaces should be
quoted. Note that line-ending tabs and spaces are always encoded, as per
RFC 1521.
The 'header' flag indicates whether we are encoding spaces as _ as per
RFC 1522.
u quotetabsu headerNs
c S s� | rN | d d � d k rN | j | d d � t | d d � � | � n7 | d k rt | j t | � | � n | j | | � d S( Ni s s .i����i����i����( u writeu quote( u su outputu lineEnd( ( u+ /opt/alt/python33/lib64/python3.3/quopri.pyu write= s
2u encode.<locals>.writes i s s _u lineEnds =
i����i����(
u b2a_qpu Noneu readu writeu readlineu bytesu needsquotingu quoteu appendu EMPTYSTRINGu joinu lenu MAXLINESIZE(
u inputu outputu quotetabsu headeru datau odatau writeu prevlineu lineu outlineu strippedu cu thisline( ( u+ /opt/alt/python33/lib64/python3.3/quopri.pyu encode, s@
c C sd t d k r"