config root man

Current Path : /usr/local/lib/python2.5/email/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/email/header.pyc

³ò
h”Rc
@s'dZdddgZddkZddkZddkZddkZddklZddk	l
Z
dZd	Zd
Z
d	dZdZd
Ze
dƒZe
dƒZeideieiBeiBƒZeidƒZeiiZd„Zeed	d„Zdfd„ƒYZd„Zd„Z dS(s+Header encoding and decoding functionality.tHeadert
decode_headertmake_headeriÿÿÿÿN(tHeaderParseError(tCharsets
t u iuiLsus-asciisutf-8s§
  =\?                   # literal =?
  (?P<charset>[^?]*?)   # non-greedy up to the next ? is the charset
  \?                    # literal ?
  (?P<encoding>[qb])    # either a "q" or a "b", case insensitive
  \?                    # literal ?
  (?P<encoded>.*?)      # non-greedy up to the next ?= is the encoded string
  \?=                   # literal ?=
  (?=[ \t]|$)           # whitespace or the end of the string
  s[\041-\176]+:$c
Cs?t|ƒ}ti|ƒp|d	fgSng}d}xÿ|iƒD]ñ}ti|ƒp|i|d	fƒqFnti|ƒ}x¯|o§|idƒiƒ}|oW|o9|ddd	jo$|ddt	|d	f|d<q|i|d	fƒn|og}|dd!D]}||i
ƒq~\}}	|d}
d	}|	djotii
|
ƒ}nG|	djo9ytii|
ƒ}Wq¶tij
o
t‚q¶Xn|d	jo
|
}n|o=|dd|jo(|dd||ddf|d<q(|i||fƒn|dd5qˆWqFW|S(
sÒDecode a message header value without converting charset.

    Returns a list of (decoded_string, charset) pairs containing each of the
    decoded parts of the header.  Charset is None for non-encoded parts of the
    header, otherwise a lower-case string containing the name of the character
    set specified in the encoded string.

    An email.Errors.HeaderParseError may be raised when certain decoding error
    occurs (e.g. a base64 decoding exception).
    tiiÿÿÿÿiitqtbiN(tstrtecretsearchtNonet
splitlinestappendtsplittpoptstriptSPACEtlowertemailt
quoprimimet
header_decodet
base64mimetdecodetbinasciitErrorR(theadertdecodedtdectlinetpartstunenct_[1]tstcharsettencodingtencoded((s(/usr/local/lib/python2.5/email/header.pyR9sH
$4




(cCsttd|d|d|ƒ}xR|D]J\}}|dj	o!t|tƒot|ƒ}n|i||ƒq"W|S(s¼Create a Header from a sequence of pairs as returned by decode_header()

    decode_header() takes a header value string and returns a sequence of
    pairs of the format (decoded_string, charset) where charset is the string
    name of the character set.

    This function takes one of those sequence of pairs and returns a Header
    instance.  Optional maxlinelen, header_name, and continuation_ws are as in
    the Header constructor.
    t
maxlinelentheader_nametcontinuation_wsN(RRt
isinstanceRR(tdecoded_seqR&R'R(thR"R#((s(/usr/local/lib/python2.5/email/header.pyRrs	cBs}eZd
d
d
d
ddd„Zd„Zd„Zd„Zd„Zd
dd„Zd„Z	d	„Z
d
„Zdd„ZRS(RtstrictcCsç|djo
t}nt|tƒpt|ƒ}n||_||_t|idtƒƒ}g|_	|dj	o|i
|||ƒn|djo
t}n|djo
||_n|t|ƒd|_|||_
dS(s Create a MIME-compliant header that can contain many character sets.

        Optional s is the initial header value.  If None, the initial header
        value is not set.  You can later append to the header with .append()
        method calls.  s may be a byte string or a Unicode string, but see the
        .append() documentation for semantics.

        Optional charset serves two purposes: it has the same meaning as the
        charset argument to the .append() method.  It also sets the default
        character set for all subsequent .append() calls that omit the charset
        argument.  If charset is not provided in the constructor, the us-ascii
        charset is used both as s's initial charset and as the default for
        subsequent .append() calls.

        The maximum line length can be specified explicit via maxlinelen.  For
        splitting the first line to a shorter value (to account for the field
        header which isn't included in s, e.g. `Subject') pass in the name of
        the field in header_name.  The default maxlinelen is 76.

        continuation_ws must be RFC 2822 compliant folding whitespace (usually
        either a space or a hard tab) which will be prepended to continuation
        lines.

        errors is passed through to the .append() call.
        s	iN(RtUSASCIIR)Rt_charsett_continuation_wstlentreplacetSPACE8t_chunksRt
MAXLINELENt
_firstlinelent_maxlinelen(tselfR"R#R&R'R(terrorstcws_expanded_len((s(/usr/local/lib/python2.5/email/header.pyt__init__Šs 

			




cCs
|iƒS(sA synonym for self.encode().(tencode(R7((s(/usr/local/lib/python2.5/email/header.pyt__str__¿scCs¹g}d}x|iD]’\}}|}|oW|djo(|djo|itƒd}q‚q†|djo|itƒq†n|}|it|t|ƒƒƒqWti|ƒS(s)Helper for the built-in unicode function.sus-asciiN(Nsus-ascii(Nsus-ascii(Nsus-ascii(RR3RtUSPACEtunicodeR	tUEMPTYSTRINGtjoin(R7tuchunkstlastcsR"R#tnextcs((s(/usr/local/lib/python2.5/email/header.pyt__unicode__Ãs




 cCs||iƒjS(N(R;(R7tother((s(/usr/local/lib/python2.5/email/header.pyt__eq__ÚscCs||jS(N((R7RE((s(/usr/local/lib/python2.5/email/header.pyt__ne__ßscCs7|djo
|i}n!t|tƒpt|ƒ}n|djoÖt|tƒoF|ipd}t|||ƒ}|ipd}|i||ƒqt|tƒolxit	|t
fD]C}y'|ipd}|i||ƒ}PWq½tj
oq½Xq½Wtp
t
d‚qn|ii||fƒdS(s>Append a string to the MIME header.

        Optional charset, if given, should be a Charset instance or the name
        of a character set (which will be converted to a Charset instance).  A
        value of None (the default) means that the charset given in the
        constructor is used.

        s may be a byte string or a Unicode string.  If it is a byte string
        (i.e. isinstance(s, str) is true), then charset is the encoding of
        that byte string, and a UnicodeError will be raised if the string
        cannot be decoded with that charset.  If s is a Unicode string, then
        charset is a hint specifying the character set of the characters in
        the string.  In this case, when producing an RFC 2822 compliant header
        using RFC 2047 rules, the Unicode string will be encoded using the
        following charsets in order: us-ascii, the charset hint, utf-8.  The
        first character set not to provoke a UnicodeError is used.

        Optional `errors' is passed as the third argument to any unicode() or
        ustr.encode() call.
        t8bitsus-asciisutf-8 conversion failedN(RR.R)RR	tinput_codecR>toutput_codecR;R-tUTF8tUnicodeErrortFalsetAssertionErrorR3R(R7R"R#R8tincodectustrtoutcodec((s(/usr/local/lib/python2.5/email/header.pyRâs*


	cCsA|i|ƒ}|i|tƒ}|i|ƒ}||jo||fgSn|djo||fgSn‰|djo|i||||ƒSnb|t|ƒjo6|}|i|| tƒ}	|i||tƒ}
nt|||ƒ\}	}
|i|	ƒ}|i|tƒ}||fg}
|
|i|
||i	|ƒS(NRHsus-ascii(
t
to_splittabletfrom_splittabletTruetencoded_header_lent_split_asciiR0RMt	_binsplitt_splitR6(R7R"R#R&t
splitcharst
splittableR%telentsplitpnttfirsttlasttfsplittabletfencodedtchunk((s(/usr/local/lib/python2.5/email/header.pyRXs$


cCs8t|||i|i|ƒ}t||gt|ƒƒS(N(RVR6R/tzipR0(R7R"R#tfirstlenRYtchunks((s(/usr/local/lib/python2.5/email/header.pyRVGsc	Cs¹g}x–|D]Ž\}}|pq
n|djp|idjo
|}n|i|ƒ}|o|didƒo
d}nd}t||||ƒq
Wt|i}|i|ƒS(NiÿÿÿÿRR(Rtheader_encodingt
header_encodetendswitht_max_appendtNLR/R@(	R7t	newchunksR&RdRR#R"textratjoiner((s(/usr/local/lib/python2.5/email/header.pyt_encode_chunksLs


s;, c
Cs¨g}|i}d}x€|iD]u\}}||d}||idƒjo
|}n||i||||ƒ7}|d\}}	|	i|ƒ}qW|i||ƒS(s‡Encode a message header into an RFC-compliant format.

        There are many issues involved in converting a given string for use in
        an email header.  Only certain character sets are readable in most
        email clients, and as header strings can only contain a subset of
        7-bit ASCII, care must be taken to properly convert and encode (with
        Base64 or quoted-printable) header strings.  In addition, there is a
        75-character length limit on any given encoded header field, so
        line-wrapping must be performed, even with double-byte character sets.

        This method will do its best to convert the string to the correct
        character set used in email, and encode and line wrap it safely with
        the appropriate scheme for that character set.

        If the given charset is not known or an error occurs during
        conversion, this function will return the header untouched.

        Optional splitchars is a string containing characters to split long
        ASCII lines on, in rough support of RFC 2822's `highest level
        syntactic breaks'.  This doesn't affect RFC 2047 encoded lines.
        iiRiÿÿÿÿ(R5R3RURXRm(
R7RYRjR&tlastlenR"R#t	targetlent	lastchunktlastcharset((s(/usr/local/lib/python2.5/email/header.pyR;os	

N(
t__name__t
__module__RR:R<RDRFRGRRXRVRmR;(((s(/usr/local/lib/python2.5/email/header.pyR‰s3				7	.		#cCsg}|}x}|iƒD]o}|iƒ}t|ƒ|jo|i|ƒ|}qnx6|D]}||joPq_q_W|i|ƒ|}qtid|ƒ}	|djo
|}
nd}
|
d}t|ƒ}t|idtƒƒ}
g}d}xi|	i|ƒD]X}|t	dt|ƒdƒ|}t|ƒ}|}|djoI|oBt|ƒdjo/t
i|dƒo|i|ƒ||7}q|||jo |o|i|i|ƒ|
ƒn||joG|djo:t
||||dƒ}|i|d ƒ|dg}n
|g}|
t|dƒ}|}q|i|ƒ||7}qW|o|i|i|ƒƒqqW|S(	Ns%s\s*s;,RRs	iiiÿÿÿÿ(R
tlstripR0RtretcompileR1R2RtmaxtfcretmatchR@RVtextend(R"RctrestlenR(RYtlinestmaxlenRtchtcreteolRltjoinlentwslentthistlinelentparttcurlentpartlentonfirstlinetsubl((s(/usr/local/lib/python2.5/email/header.pyRV—sd


	



!'
	

c
Csµd}t|ƒ}xj||jo\||dd?}|i|| tƒ}|i|ƒ}||jo
|}q|d}qW|i|| tƒ}|i||tƒ}	||	fS(Nii(R0RSRTRURM(
RZR#R&titjtmRatchunklenR]R^((s(/usr/local/lib/python2.5/email/header.pyRWÝs
	

(!t__doc__t__all__RuRtemail.quoprimimeRtemail.base64mimetemail.errorsRt
email.charsetRRiRR=R2R?R4R-RKRvtVERBOSEt
IGNORECASEt	MULTILINER
RxRRhRRRRRVRW(((s(/usr/local/lib/python2.5/email/header.pys<module>s8	
		9ÿ	F

Man Man