AlkantarClanX12

Your IP : 18.119.122.140


Current Path : /proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/cgi.cpython-33.pyo

�
��f�c@sUdZdZddlmZmZmZddlmZddlZddl	Z	ddl
Zddlm
Z
ddlmZddlmZddlZddlZddlZd	d
ddd
dddddddddgZdaeadd�Zdd�Zdd�Zdd�Zeadaee	jddd d�Z ddd!d�Z!ddd"d
�Z"d#d�Z#d$d%�Z$d&d�Z%Gd'd	�d	�Z&Gd(d
�d
�Z'e	jd)d*�Z(eeeed+d�Z)e	jd,d�Z*d-d�Z+d.d�Z,d/d�Z-d0d�Z.ed1d�Z/ed2d3�Z0e1d4krQe(�ndS(5u�Support module for CGI (Common Gateway Interface) scripts.

This module defines a number of utilities for use by CGI scripts
written in Python.
u2.6i(uStringIOuBytesIOu
TextIOWrapper(uMappingN(u
FeedParser(uMessage(uwarnuMiniFieldStorageuFieldStorageuparseuparse_qsu	parse_qsluparse_multipartuparse_headeruprint_exceptionu
print_environu
print_formuprint_directoryuprint_argumentsuprint_environ_usageuescapeucGs[tr8tr8yttd�aWq8tk
r4Yq8XntsGtantat|�dS(u�Write a log message, if there is a log file.

    Even though this function is called initlog(), you should always
    use log(); log is a variable that is set either to initlog
    (initially), to dolog (once the log file has been opened), or to
    nolog (when logging is disabled).

    The first argument is a format string; the remaining arguments (if
    any) are arguments to the % operator, so e.g.
        log("%s: %s", "a", "b")
    will write "a: b" to the log file, followed by a newline.

    If the global logfp is not None, it should be a file object to
    which log data is written.

    If the global logfp is None, the global logfile may be a string
    giving a filename to open, in append mode.  This file should be
    world writable!!!  If the file can't be opened, logging is
    silently disabled (since there is no safe place where we could
    send an error message).

    uaN(ulogfileulogfpuopenuIOErrorunologulogudolog(uallargs((u(/opt/alt/python33/lib64/python3.3/cgi.pyuinitlog:s

	uinitlogcGstj||d�dS(u=Write a log message to the log file.  See initlog() for docs.u
N(ulogfpuwrite(ufmtuargs((u(/opt/alt/python33/lib64/python3.3/cgi.pyudolog]sudologcGsdS(u9Dummy function, assigned to log when logging is disabled.N((uallargs((u(/opt/alt/python33/lib64/python3.3/cgi.pyunologasunologcCs)datrtj�dantadS(uClose the log file.uN(ulogfileulogfpucloseuNoneuinitlogulog(((u(/opt/alt/python33/lib64/python3.3/cgi.pyucloseloges

	ucloselogc	Cs�|dkrtj}nt|d�r3|j}nd}t|t�rT|j}nd|krmd|d<n|ddkr�t|d�\}}|dkr�t	||�S|dkrt
|d	�}tr�|tkr�td
��n|j
|�j|�}nd}d|kr:|r)|d
}n||d}n:tjdd�rt|r`|d
}n|tjd}n||d<nLd|kr�|d}n3tjdd�r�tjd}nd}||d<tjj|||d|�S(u'Parse a query in the environment or from a file (default stdin)

        Arguments, all optional:

        fp              : file pointer; default: sys.stdin.buffer

        environ         : environment dictionary; default: os.environ

        keep_blank_values: flag indicating whether blank values in
            percent-encoded forms should be treated as blank strings.
            A true value indicates that blanks should be retained as
            blank strings.  The default false value indicates that
            blank values are to be ignored and treated as if they were
            not included.

        strict_parsing: flag indicating what to do with parsing errors.
            If false (the default), errors are silently ignored.
            If true, errors raise a ValueError exception.
    uencodingulatin-1uREQUEST_METHODuGETuPOSTuCONTENT_TYPEumultipart/form-datau!application/x-www-form-urlencodeduCONTENT_LENGTHuMaximum content length exceededuuQUERY_STRINGu&iN(uNoneusysustdinuhasattruencodingu
isinstanceu
TextIOWrapperubufferuparse_headeruparse_multipartuintumaxlenu
ValueErrorureadudecodeuargvuurllibuparseuparse_qs(	ufpuenvironukeep_blank_valuesustrict_parsinguencodinguctypeupdictuclengthuqs((u(/opt/alt/python33/lib64/python3.3/cgi.pyuparsexsH






cCs&tdtd�tjj|||�S(u)Parse a query given as a string argument.u=cgi.parse_qs is deprecated, use urllib.parse.parse_qs insteadi(uwarnuDeprecationWarninguurllibuparseuparse_qs(uqsukeep_blank_valuesustrict_parsing((u(/opt/alt/python33/lib64/python3.3/cgi.pyuparse_qs�s
cCs&tdtd�tjj|||�S(u)Parse a query given as a string argument.u?cgi.parse_qsl is deprecated, use urllib.parse.parse_qsl insteadi(uwarnuDeprecationWarninguurllibuparseu	parse_qsl(uqsukeep_blank_valuesustrict_parsing((u(/opt/alt/python33/lib64/python3.3/cgi.pyu	parse_qsl�s
cCs�ddl}d}d|kr+|d}nt|�sMtd|f��nd|}d|d}i}d}xD||kr�d}d}	|r)|jj|�}
|
jd�}|r�yt|�}Wq�tk
r�Yq�Xn|dkr tr|tkrtd	��n|j	|�}	q)d}	ng}x`|j
�}
|
sN|}Pn|
jd�r�|
j�}|||fkr�Pq�n|j
|
�q2|	dkr�qtn|dkr1|r1|d}
|
dd�dkr�|
dd�}
n)|
dd�dkr|
dd�}
n|
|d<dj|�}	q1n|
d
}
|
sGqtnt|
�\}}|dkrkqtnd|krt|d}nqt||kr�||j
|	�qt|	g||<qtW|S(u�Parse multipart input.

    Arguments:
    fp   : input file
    pdict: dictionary containing other parameters of content-type header

    Returns a dictionary just like parse_qs(): keys are the field names, each
    value is a list of values for that field.  This is easy to use but not
    much good if you are expecting megabytes to be uploaded -- in that case,
    use the FieldStorage class instead which is much more flexible.  Note
    that content-type is the raw, unparsed contents of the content-type
    header.

    XXX This does not parse nested multipart parts -- use FieldStorage for
    that.

    XXX This should really be subsumed by FieldStorage altogether -- no
    point in having two implementations of the same parsing algorithm.
    Also, FieldStorage protects itself better against certain DoS attacks
    by limiting the size of the data read in one chunk.  The API here
    does not support that kind of protection.  This also affects parse()
    since it can call parse_multipart().

    iNsuboundaryu&Invalid boundary in multipart form: %rs--iucontent-lengthuMaximum content length exceededis
s
ucontent-dispositionu	form-dataunamei����i����i����i����i����i����i����(uhttp.clientuvalid_boundaryu
ValueErroruNoneuclientu
parse_headersugetuintumaxlenureadureadlineu
startswithurstripuappendujoinuparse_header(ufpupdictuhttpuboundaryunextpartulastpartupartdictu
terminatorubytesudatauheadersuclengthulinesulineukeyuparamsuname((u(/opt/alt/python33/lib64/python3.3/cgi.pyuparse_multipart�s|


	



ccs�x�|dd�dkr�|dd�}|jd�}xR|dkr�|jdd|�|jdd|�dr�|jd|d�}q;W|dkr�t|�}n|d|�}|j�V||d�}qWdS(Niu;iu"u\"i(ufinducountulenustrip(usuenduf((u(/opt/alt/python33/lib64/python3.3/cgi.pyu_parseparam-s;u_parseparamcCstd|�}|j�}i}x�|D]�}|jd�}|dkr)|d|�j�j�}||dd�j�}t|�dkr�|d|dko�dknr�|dd�}|jdd	�jd
d�}n|||<q)q)W||fS(
ufParse a Content-type like header.

    Return the main content-type and a dictionary of options.

    u;u=iNiiu"u\\u\u\"i����i����(u_parseparamu__next__ufindustripulowerulenureplace(ulineupartsukeyupdictupuiunameuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyuparse_header9s
6!cBsb|EeZdZdZdZdZdZdZiZ	dZ
iZiZdd�Z
dd�ZdS(uMiniFieldStorageu=Like FieldStorage, for use when no file uploads are possible.cCs||_||_dS(u&Constructor from field name and value.N(unameuvalue(uselfunameuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__init___s	uMiniFieldStorage.__init__cCsd|j|jfS(u Return printable representation.uMiniFieldStorage(%r, %r)(unameuvalue(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__repr__esuMiniFieldStorage.__repr__N(u__name__u
__module__u__qualname__u__doc__uNoneufilenameulistutypeufileutype_optionsudispositionudisposition_optionsuheadersu__init__u__repr__(u
__locals__((u(/opt/alt/python33/lib64/python3.3/cgi.pyuMiniFieldStorageQscBsR|EeZdZdZd4d4dejddd4dddd�	Zdd	�Zd
d�Z	dd
�Z
dd�Zd4dd�Zd4dd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd4Zd d!�Zd"d#�Zd5Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4S(6uFieldStorageu�Store a sequence of fields, reading multipart/form-data.

    This class provides naming, typing, files stored on disk, and
    more.  At the top level, it is accessible like a dictionary, whose
    keys are the field names.  (Note: None can occur as a field name.)
    The items are either a Python list (if there's multiple values) or
    another FieldStorage or MiniFieldStorage object.  If it's a single
    object, it has the following attributes:

    name: the field name, if specified; otherwise None

    filename: the filename, if specified; otherwise None; this is the
        client side filename, *not* the file name on which it is
        stored (that's a temporary file you don't deal with)

    value: the value as a *string*; for file uploads, this
        transparently reads the file every time you request the value
        and returns *bytes*

    file: the file(-like) object from which you can read the data *as
        bytes* ; None if the data is stored a simple string

    type: the content-type, or None if not specified

    type_options: dictionary of options specified on the content-type
        line

    disposition: content-disposition, or None if not specified

    disposition_options: dictionary of corresponding options

    headers: a dictionary(-like) object (sometimes email.message.Message or a
        subclass thereof) containing *all* headers

    The class is subclassable, mostly for the purpose of overriding
    the make_file() method, which is called internally to come up with
    a file open for reading and writing.  This makes it possible to
    override the default choice of storing all files in a temporary
    directory and unlinking them as soon as they have been opened.

    siuutf-8ureplacec
Cs�d}
||_||_d|kr7|dj�}
nd|_|
dksX|
dkr�d|krq|d}n)tjdd�r�tjd}nd}|jtj	�d�}t
|�}|dkr�id	d
6}q�n|dkrai}|
dkrd	|d
<nd|kr%|d|d
<nd|krA|d|_nd
|kr�|d
|d<q�n$t|tt
f�s�td��n||_|dkr�tjj|_nTt|t�r�|j|_n6t|d�o�t|d�s�td��n||_||_|	|_t|t�s=tdt|�j��n||_d|_||_di}}
d|jkr�t|jd�\}}
n||_|
|_d|_ d|
kr�|
d|_ nd|_!d|
kr�|
d|_!n|j!dk	|_"d
|jkr)t|jd
�\}}
n2|js>|
dkrNdi}}
n
d	i}}
||_|
|_#d|
kr�|
dj|j�|_$n	d|_$d}d|jkryt%|jd�}Wnt&k
r�YnXt'r|t'krt&d��qn||_(|jdkr-|r-||_nd|_)|_*d|_+|d	kr_|j,�n6|dd�dkr�|j-|||�n
|j.�dS(u�Constructor.  Read multipart/* until last part.

        Arguments, all optional:

        fp              : file pointer; default: sys.stdin.buffer
            (not used when the request method is GET)
            Can be :
            1. a TextIOWrapper object
            2. an object whose read() and readline() methods return bytes

        headers         : header dictionary-like object; default:
            taken from environ as per CGI spec

        outerboundary   : terminating multipart boundary
            (for internal use only)

        environ         : environment dictionary; default: os.environ

        keep_blank_values: flag indicating whether blank values in
            percent-encoded forms should be treated as blank strings.
            A true value indicates that blanks should be retained as
            blank strings.  The default false value indicates that
            blank values are to be ignored and treated as if they were
            not included.

        strict_parsing: flag indicating what to do with parsing errors.
            If false (the default), errors are silently ignored.
            If true, errors raise a ValueError exception.

        limit : used internally to read parts of multipart/form-data forms,
            to exit from the reading loop when reached. It is the difference
            between the form content-length and the number of bytes already
            read

        encoding, errors : the encoding and error handler used to decode the
            binary stream to strings. Must be the same as the charset defined
            for the page sending the form (content-type : meta http-equiv or
            header)

        uGETuREQUEST_METHODuHEADuQUERY_STRINGiNuusurrogateescapeu!application/x-www-form-urlencodeducontent-typeuPOSTuCONTENT_TYPEuCONTENT_LENGTHucontent-lengthu?headers must be mapping or an instance of email.message.Messageureadureadlineufp must be file pointeru#outerboundary must be bytes, not %siucontent-dispositionunameufilenameu
text/plainuboundarysuMaximum content length exceededi
u
multipart/i����(/ukeep_blank_valuesustrict_parsinguupperuNoneu
qs_on_postusysuargvuencodeulocaleugetpreferredencodinguBytesIOu
isinstanceuMappinguMessageu	TypeErroruheadersustdinubufferufpu
TextIOWrapperuhasattruencodinguerrorsubytesutypeu__name__u
outerboundaryu
bytes_readulimituparse_headerudispositionudisposition_optionsunameufilenameu_binary_fileutype_optionsu
innerboundaryuintu
ValueErrorumaxlenulengthulistufileudoneuread_urlencodedu
read_multiuread_single(uselfufpuheadersu
outerboundaryuenvironukeep_blank_valuesustrict_parsingulimituencodinguerrorsumethoduqsucdispupdictuctypeuclen((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__init__�s�+			

							
				
			
		
uFieldStorage.__init__cCsd|j|j|jfS(u"Return a printable representation.uFieldStorage(%r, %r, %r)(unameufilenameuvalue(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__repr__3suFieldStorage.__repr__cCst|j��S(N(uiterukeys(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__iter__8suFieldStorage.__iter__cCs{|dkrt|��n|jrV|jjd�|jj�}|jjd�n!|jdk	rq|j}nd}|S(Nuvaluei(uAttributeErrorufileuseekureadulistuNone(uselfunameuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__getattr__;s	uFieldStorage.__getattr__cCs�|jdkrtd��ng}x0|jD]%}|j|kr.|j|�q.q.W|slt|��nt|�dkr�|dS|SdS(uDictionary style indexing.u
not indexableiiN(ulistuNoneu	TypeErrorunameuappenduKeyErrorulen(uselfukeyufounduitem((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__getitem__HsuFieldStorage.__getitem__cCsH||kr@||}t|t�r6dd�|D�S|jSn|SdS(u8Dictionary style get() method, including 'value' lookup.cSsg|]}|j�qS((uvalue(u.0ux((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
<listcomp>[s	u)FieldStorage.getvalue.<locals>.<listcomp>N(u
isinstanceulistuvalue(uselfukeyudefaultuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyugetvalueVs

uFieldStorage.getvaluecCsB||kr:||}t|t�r0|djS|jSn|SdS(u! Return the first value received.iN(u
isinstanceulistuvalue(uselfukeyudefaultuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyugetfirstas

uFieldStorage.getfirstcCsK||krC||}t|t�r6dd�|D�S|jgSngSdS(u  Return list of received values.cSsg|]}|j�qS((uvalue(u.0ux((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
<listcomp>qs	u(FieldStorage.getlist.<locals>.<listcomp>N(u
isinstanceulistuvalue(uselfukeyuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyugetlistls

uFieldStorage.getlistcCs>|jdkrtd��nttdd�|jD���S(uDictionary style keys() method.u
not indexablecss|]}|jVqdS(N(uname(u.0uitem((u(/opt/alt/python33/lib64/python3.3/cgi.pyu	<genexpr>{su$FieldStorage.keys.<locals>.<genexpr>N(ulistuNoneu	TypeErroruset(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyukeyswsuFieldStorage.keyscs>|jdkrtd��nt�fdd�|jD��S(u%Dictionary style __contains__ method.u
not indexablec3s|]}|j�kVqdS(N(uname(u.0uitem(ukey(u(/opt/alt/python33/lib64/python3.3/cgi.pyu	<genexpr>�su,FieldStorage.__contains__.<locals>.<genexpr>N(ulistuNoneu	TypeErroruany(uselfukey((ukeyu(/opt/alt/python33/lib64/python3.3/cgi.pyu__contains__}suFieldStorage.__contains__cCst|j��S(u Dictionary style len(x) support.(ulenukeys(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__len__�suFieldStorage.__len__cCs+|jdkrtd��nt|j�S(NuCannot be converted to bool.(ulistuNoneu	TypeErrorubool(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__bool__�suFieldStorage.__bool__cCs�|jj|j�}t|t�sItd|jt|�jf��n|j|j	|j
�}|jr~|d|j7}ng|_t
jj||j|jd|j	d|j
�}x-|D]%\}}|jjt||��q�W|j�dS(u+Internal: read data in query string format.u%s should return bytes, got %su&uencodinguerrorsN(ufpureadulengthu
isinstanceubytesu
ValueErrorutypeu__name__udecodeuencodinguerrorsu
qs_on_postulistuurllibuparseu	parse_qslukeep_blank_valuesustrict_parsinguappenduMiniFieldStorageu
skip_lines(uselfuqsuqueryukeyuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyuread_urlencoded�s			uFieldStorage.read_urlencodedcCs7|j}t|�s+td|f��ng|_|jr�tjj|j|j|j	d|j
d|j�}x-|D]%\}}|jjt
||��qwWd}n|jp�|j}	|jj�}
t|
t�s�td|jt|
�jf��n|jt|
�7_xt�}d}x,|jj�}
||
7}|
j�s(Pq(q(|s^Pn|jt|�7_|j|j|j
|j��|j�}|	|j||||||j|j|j
|j�	}|j|j7_|jj|�|js"|j|j kodknrPqq|j!�dS(u/Internal: read a part that is itself multipart.u&Invalid boundary in multipart form: %ruencodinguerrorsu%s should return bytes, got %ssiN("u
innerboundaryuvalid_boundaryu
ValueErrorulistu
qs_on_postuurllibuparseu	parse_qslukeep_blank_valuesustrict_parsinguencodinguerrorsuappenduMiniFieldStorageuNoneuFieldStorageClassu	__class__ufpureadlineu
isinstanceubytesutypeu__name__u
bytes_readulenu
FeedParserustripufeedudecodeucloseulimitudoneulengthu
skip_lines(uselfuenvironukeep_blank_valuesustrict_parsinguibuqueryukeyuvalueuFieldStorageClassuklassu
first_lineuparseruhdr_textudatauheadersupart((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
read_multi�sL						
+uFieldStorage.read_multicCsD|jdkr&|j�|j�n
|j�|jjd�dS(uInternal: read an atomic part.iN(ulengthuread_binaryu
skip_linesu
read_linesufileuseek(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyuread_single�s



uFieldStorage.read_singleiicCs�|j�|_|j}|dkr�x�|dkr�|jjt||j��}t|t�s�t	d|jt
|�jf��n|jt
|�7_|s�d|_Pn|jj|�|t
|�}q'WndS(uInternal: read binary data.iu%s should return bytes, got %siNi����(u	make_fileufileulengthufpureaduminubufsizeu
isinstanceubytesu
ValueErrorutypeu__name__u
bytes_readulenudoneuwrite(uselfutodoudata((u(/opt/alt/python33/lib64/python3.3/cgi.pyuread_binary�s		uFieldStorage.read_binarycCsV|jrt�|_|_nt�|_|_|jrH|j�n
|j�dS(u0Internal: read lines until EOF or outerboundary.N(u_binary_fileuBytesIOufileu_FieldStorage__fileuStringIOu
outerboundaryuread_lines_to_outerboundaryuread_lines_to_eof(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
read_lines�s		
uFieldStorage.read_linescCs�|jdk	rk|jj�t|�dkrk|j�|_|jj�}|jj|�d|_qkn|jr�|jj|�n"|jj|j	|j
|j��dS(u line is always bytes, not stringi�N(u_FieldStorage__fileuNoneutellulenu	make_fileufileugetvalueuwriteu_binary_fileudecodeuencodinguerrors(uselfulineudata((u(/opt/alt/python33/lib64/python3.3/cgi.pyu__write�s	uFieldStorage.__writecCsQxJ|jjd�}|jt|�7_|s=d|_Pn|j|�qdS(uInternal: read lines until EOF.iiNii����(ufpureadlineu
bytes_readulenudoneu_FieldStorage__write(uselfuline((u(/opt/alt/python33/lib64/python3.3/cgi.pyuread_lines_to_eofs	uFieldStorage.read_lines_to_eofc	Cs�d|j}|d}d}d}d}xy||jkr?Pn|jjd�}|jt|�7_|t|�7}|s�d
|_Pn|dkr�||}d}n|jd�r�|r�|j	�}||kr�Pn||kr�d|_Pq�n|}|j
d�r)d}|dd�}d}nh|j
d
�rWd
}|dd�}d}n:|j
d�r�d}|dd�}d}nd}d}|j||�q,dS(u�Internal: read lines until outerboundary.
        Data is read as bytes: boundaries and line ends must be converted
        to bytes for comparisons.
        s--siiis
s
Nis
Tii����i����i����i����F(
u
outerboundaryuTrueulimitufpureadlineu
bytes_readulenudoneu
startswithurstripuendswithuFalseu_FieldStorage__write(	uselfu
next_boundaryu
last_boundaryudelimulast_line_lfendu_readulineustrippedlineuodelim((u(/opt/alt/python33/lib64/python3.3/cgi.pyuread_lines_to_outerboundarysP

	
					u(FieldStorage.read_lines_to_outerboundarycCs�|js|jrdSd|j}|d}d}x�|jjd�}|jt|�7_|sqd|_Pn|jd�r�|r�|j�}||kr�Pn||kr�d|_Pq�n|jd�}q7dS(	u5Internal: skip lines until outer boundary if defined.Ns--iis
Tii����(	u
outerboundaryudoneuTrueufpureadlineu
bytes_readulenuendswithustrip(uselfu
next_boundaryu
last_boundaryulast_line_lfendulineustrippedline((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
skip_lines=s&

		uFieldStorage.skip_linescCs6|jrtjd�Stjdd|jdd�SdS(u�Overridable: return a readable & writable file.

        The file will be used as follows:
        - data is written to it
        - seek(0)
        - data is read from it

        The file is opened in binary mode for files, in text mode
        for other fields

        This version opens a temporary file for reading and writing,
        and immediately deletes (unlinks) it.  The trick (on Unix!) is
        that the file can still be used, but it can't be opened by
        another process, and it will automatically be deleted when it
        is closed or when the current process terminates.

        If you want a more permanent file, you derive a class which
        overrides this method.  If you want a visible temporary file
        that is nevertheless automatically deleted when the script
        terminates, try defining a __del__ method in a derived class
        which unlinks the temporary files you have created.

        uwb+uw+uencodingunewlineu
N(u_binary_fileutempfileu
TemporaryFileuencoding(uself((u(/opt/alt/python33/lib64/python3.3/cgi.pyu	make_fileSs	
uFieldStorage.make_fileNi (u__name__u
__module__u__qualname__u__doc__uNoneuosuenvironu__init__u__repr__u__iter__u__getattr__u__getitem__ugetvalueugetfirstugetlistukeysu__contains__u__len__u__bool__uread_urlencodeduFieldStorageClassu
read_multiuread_singleubufsizeuread_binaryu
read_linesu_FieldStorage__writeuread_lines_to_eofuread_lines_to_outerboundaryu
skip_linesu	make_file(u
__locals__((u(/opt/alt/python33/lib64/python3.3/cgi.pyuFieldStoragejs6*	�
-	
1cCs�td�t�tjt_ybt�}t�t�t|�t|�t	�dd�}|dd�}td�|�Wnt
�YnXtd�day/t�}t�t�t|�t|�Wnt
�YnXd	S(
u�Robust test CGI script, usable as main program.

    Write minimal HTTP headers and dump all information provided to
    the script in HTML form.

    uContent-type: text/htmlcSstd�dS(Nu,testing print_exception() -- <I>italics?</I>(uexec(((u(/opt/alt/python33/lib64/python3.3/cgi.pyuf�sutest.<locals>.fcSs|�dS(N((uf((u(/opt/alt/python33/lib64/python3.3/cgi.pyug�sutest.<locals>.gu9<H3>What follows is a test, not an actual exception:</H3>u*<H1>Second try with a small maxlen...</H1>i2N(uprintusysustdoutustderruFieldStorageuprint_directoryuprint_argumentsu
print_formu
print_environuprint_environ_usageuprint_exceptionumaxlen(uenvironuformufug((u(/opt/alt/python33/lib64/python3.3/cgi.pyutestus4
	



	
utestcCs�|dkr$tj�\}}}nddl}t�td�|j||�|j||�}tdtjdj	|dd���tj|d�f�~dS(Niu+<H3>Traceback (most recent call last):</H3>u<PRE>%s<B>%s</B></PRE>uii����i����(
uNoneusysuexc_infou	tracebackuprintu	format_tbuformat_exception_onlyuhtmluescapeujoin(utypeuvalueutbulimitu	tracebackulist((u(/opt/alt/python33/lib64/python3.3/cgi.pyuprint_exception�s
cCs|t|j��}t�td�td�x7|D]/}tdtj|�dtj||��q4Wtd�t�dS(u#Dump the shell environment as HTML.u<H3>Shell Environment:</H3>u<DL>u<DT>u<DD>u</DL>N(usortedukeysuprintuhtmluescape(uenvironukeysukey((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
print_environ�s


-
cCs�t|j��}t�td�|s6td�ntd�x}|D]u}tdtj|�ddd�||}tdtjtt|���d	�td
tjt|���qGWtd�t�dS(
u$Dump the contents of a form as HTML.u<H3>Form Contents:</H3>u<P>No form fields.u<DL>u<DT>u:uendu u<i>u</i>u<DD>u</DL>N(usortedukeysuprintuhtmluescapeureprutype(uformukeysukeyuvalue((u(/opt/alt/python33/lib64/python3.3/cgi.pyu
print_form�s



!
'!
cCs�t�td�ytj�}WnDtjk
rg}z!tdtjt|���WYdd}~XnXttj|��t�dS(u#Dump the current directory as HTML.u#<H3>Current Working Directory:</H3>u	os.error:N(uprintuosugetcwduerroruhtmluescapeustr(upwdumsg((u(/opt/alt/python33/lib64/python3.3/cgi.pyuprint_directory�s
/cCs0t�td�t�ttj�t�dS(Nu <H3>Command Line Arguments:</H3>(uprintusysuargv(((u(/opt/alt/python33/lib64/python3.3/cgi.pyuprint_arguments�s


cCstd�dS(u9Dump a list of environment variables used by CGI as HTML.u�
<H3>These environment variables could have been set:</H3>
<UL>
<LI>AUTH_TYPE
<LI>CONTENT_LENGTH
<LI>CONTENT_TYPE
<LI>DATE_GMT
<LI>DATE_LOCAL
<LI>DOCUMENT_NAME
<LI>DOCUMENT_ROOT
<LI>DOCUMENT_URI
<LI>GATEWAY_INTERFACE
<LI>LAST_MODIFIED
<LI>PATH
<LI>PATH_INFO
<LI>PATH_TRANSLATED
<LI>QUERY_STRING
<LI>REMOTE_ADDR
<LI>REMOTE_HOST
<LI>REMOTE_IDENT
<LI>REMOTE_USER
<LI>REQUEST_METHOD
<LI>SCRIPT_NAME
<LI>SERVER_NAME
<LI>SERVER_PORT
<LI>SERVER_PROTOCOL
<LI>SERVER_ROOT
<LI>SERVER_SOFTWARE
</UL>
In addition, HTTP headers sent by the server may be passed in the
environment as well.  Here are some common variable names:
<UL>
<LI>HTTP_ACCEPT
<LI>HTTP_CONNECTION
<LI>HTTP_HOST
<LI>HTTP_PRAGMA
<LI>HTTP_REFERER
<LI>HTTP_USER_AGENT
</UL>
N(uprint(((u(/opt/alt/python33/lib64/python3.3/cgi.pyuprint_environ_usage�s'cCshtdtdd�|jdd�}|jdd�}|jdd	�}|rd|jd
d�}n|S(uDeprecated API.u1cgi.escape is deprecated, use html.escape insteadu
stackleveliu&u&amp;u<u&lt;u>u&gt;u"u&quot;(uwarnuDeprecationWarningureplace(usuquote((u(/opt/alt/python33/lib64/python3.3/cgi.pyuescapes
cCs:ddl}t|t�r$d}nd}|j||�S(Nis^[ -~]{0,200}[!-~]$u^[ -~]{0,200}[!-~]$(ureu
isinstanceubytesumatch(usu_vb_patternure((u(/opt/alt/python33/lib64/python3.3/cgi.pyuvalid_boundarys
	uvalid_boundaryu__main__(2u__doc__u__version__uiouStringIOuBytesIOu
TextIOWrapperucollectionsuMappingusysuosuurllib.parseuurllibuemail.parseru
FeedParseru
email.messageuMessageuwarningsuwarnuhtmlulocaleutempfileu__all__ulogfileuNoneulogfpuinitlogudologunologucloselogulogumaxlenuenvironuparseuparse_qsu	parse_qsluparse_multipartu_parseparamuparse_headeruMiniFieldStorageuFieldStorageutestuprint_exceptionu
print_environu
print_formuprint_directoryuprint_argumentsuprint_environ_usageuescapeuvalid_boundaryu__name__(((u(/opt/alt/python33/lib64/python3.3/cgi.pyu<module>s\		#	Ed��
'/