D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
opt
/
python35
/
lib
/
python3.5
/
email
/
__pycache__
/
Filename :
message.cpython-35.pyc
back
Copy
x�eβ � @ 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 �,/opt/python35/lib/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 �encode_rfc2231�encode�UnicodeEncodeError� tspecials�search�quote)r �valuer"