AlkantarClanX12
Current Path : /proc/self/root/opt/alt/python35/lib64/python3.5/email/__pycache__/ |
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/email/__pycache__/message.cpython-35.opt-1.pyc |
��Yfβ � @ s< d Z d g Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e j Z d Z e j d � Z d d � Z d d d d � Z d d � Z d d � Z Gd d � d � Z Gd d � d e � Z Gd d � d e � Z d S)z8Basic message object for the email package object model.�Message� N)�BytesIO�StringIO)�utils)�errors)�compat32)�charset)�decode_bz; z[ \(\)<>@,;:\\"/\[\]\?=]c C sJ t | � j d � \ } } } | s4 | j � d f S| j � | j � f S)N�;)�str� partition�strip)�param�a�sep�b� r �2/opt/alt/python35/lib64/python3.5/email/message.py�_splitparam s r Tc C s� | d k r� t | � d k r� t | t � rf | d 7} t j | d | d | d � } d | | f Sy | j d � Wn? t k r� | d 7} t j | d d � } d | | f SYn X| s� t j | � r� d | t j | � f Sd | | f Sn | Sd S)a~ Convenience function to format and return a key=value pair. This will quote the value if needed or if quote is true. If value is a three tuple (charset, language, value), it will be encoded according to RFC2231 rules. If it contains non-ascii characters it will likewise be encoded according to RFC2231 rules, using the utf-8 charset and a null language. Nr �*� � z%s=%s�asciizutf-8� z%s="%s") �len� isinstance�tupler Zencode_rfc2231�encode�UnicodeEncodeError� tspecials�search�quote)r �valuer! r r r �_formatparam( s ! r# c C sI d t | � } g } x,| d d � d k rD| d d � } | j d � } xR | d k r� | j d d | � | j d d | � d r� | j d | d � } qQ W| d k r� t | � } | d | � } d | k r| j d � } | d | � j � j � d | | d d � j � } | j | j � � | | d � } q W| S)Nr r r �"z\"r �=)r �find�countr �indexr �lower�append)�sZplist�end�f�ir r r �_parseparamJ s ;8r/ c C sB t | t � r1 | d | d t j | d � f St j | � Sd S)Nr r r )r r r �unquote)r"