Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /usr/lib64/python2.7/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/cgi.py
#! /usr/bin/python2.7

# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
# intentionally NOT "/usr/bin/env python".  On many systems
# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
# scripts, and /usr/local/bin is the default directory where Python is
# installed, so /usr/bin/env would be unable to find python.  Granted,
# binary installations by Linux vendors often install Python in
# /usr/bin.  So let those vendors patch cgi.py to match their choice
# of installation.

"""Support module for CGI (Common Gateway Interface) scripts.

This module defines a number of utilities for use by CGI scripts
written in Python.
"""

# XXX Perhaps there should be a slimmed version that doesn't contain
# all those backwards compatible and debugging classes and functions?

# History
# -------
#
# Michael McLay started this module.  Steve Majewski changed the
# interface to SvFormContentDict and FormContentDict.  The multipart
# parsing was inspired by code submitted by Andreas Paepcke.  Guido van
# Rossum rewrote, reformatted and documented the module and is currently
# responsible for its maintenance.
#

__version__ = "2.6"


# Imports
# =======

from operator import attrgetter
import sys
import os
import UserDict
import urlparse

from warnings import filterwarnings, catch_warnings, warn
with catch_warnings():
    if sys.py3kwarning:
        filterwarnings("ignore", ".*mimetools has been removed",
                       DeprecationWarning)
        filterwarnings("ignore", ".*rfc822 has been removed",
                       DeprecationWarning)
    import mimetools
    import rfc822

try:
    from cStringIO import StringIO
except ImportError:
    from StringIO import StringIO

__all__ = ["MiniFieldStorage", "FieldStorage", "FormContentDict",
           "SvFormContentDict", "InterpFormContentDict", "FormContent",
           "parse", "parse_qs", "parse_qsl", "parse_multipart",
           "parse_header", "print_exception", "print_environ",
           "print_form", "print_directory", "print_arguments",
           "print_environ_usage", "escape"]

# Logging support
# ===============

logfile = ""            # Filename to log to, if not empty
logfp = None            # File object to log to, if not None

def initlog(*allargs):
    """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).

    """
    global logfp, log
    if logfile and not logfp:
        try:
            logfp = open(logfile, "a")
        except IOError:
            pass
    if not logfp:
        log = nolog
    else:
        log = dolog
    log(*allargs)

def dolog(fmt, *args):
    """Write a log message to the log file.  See initlog() for docs."""
    logfp.write(fmt%args + "\n")

def nolog(*allargs):
    """Dummy function, assigned to log when logging is disabled."""
    pass

log = initlog           # The current logging function


# Parsing functions
# =================

# Maximum input we will accept when REQUEST_METHOD is POST
# 0 ==> unlimited input
maxlen = 0

def parse(fp=None, environ=os.environ, keep_blank_values=0,
          strict_parsing=0, separator=None):
    """Parse a query in the environment or from a file (default stdin)

        Arguments, all optional:

        fp              : file pointer; default: sys.stdin

        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.

        separator: str. The symbol to use for separating the query arguments.
    """
    if fp is None:
        fp = sys.stdin
    if not 'REQUEST_METHOD' in environ:
        environ['REQUEST_METHOD'] = 'GET'       # For testing stand-alone
    if environ['REQUEST_METHOD'] == 'POST':
        ctype, pdict = parse_header(environ['CONTENT_TYPE'])
        if ctype == 'multipart/form-data':
            return parse_multipart(fp, pdict)
        elif ctype == 'application/x-www-form-urlencoded':
            clength = int(environ['CONTENT_LENGTH'])
            if maxlen and clength > maxlen:
                raise ValueError, 'Maximum content length exceeded'
            qs = fp.read(clength)
        else:
            qs = ''                     # Unknown content-type
        if 'QUERY_STRING' in environ:
            if qs: qs = qs + '&'
            qs = qs + environ['QUERY_STRING']
        elif sys.argv[1:]:
            if qs: qs = qs + '&'
            qs = qs + sys.argv[1]
        environ['QUERY_STRING'] = qs    # XXX Shouldn't, really
    elif 'QUERY_STRING' in environ:
        qs = environ['QUERY_STRING']
    else:
        if sys.argv[1:]:
            qs = sys.argv[1]
        else:
            qs = ""
        environ['QUERY_STRING'] = qs    # XXX Shouldn't, really
    return urlparse.parse_qs(qs, keep_blank_values, strict_parsing, separator=separator)


# parse query string function called from urlparse,
# this is done in order to maintain backward compatibility.

def parse_qs(qs, keep_blank_values=0, strict_parsing=0, separator=None):
    """Parse a query given as a string argument."""
    warn("cgi.parse_qs is deprecated, use urlparse.parse_qs instead",
         PendingDeprecationWarning, 2)
    return urlparse.parse_qs(qs, keep_blank_values, strict_parsing,
                             separator=separator)


def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None, separator=None):
    """Parse a query given as a string argument."""
    warn("cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead",
         PendingDeprecationWarning, 2)
    return urlparse.parse_qsl(qs, keep_blank_values, strict_parsing,
                              max_num_fields, separator=separator)

def parse_multipart(fp, pdict):
    """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().

    """
    boundary = ""
    if 'boundary' in pdict:
        boundary = pdict['boundary']
    if not valid_boundary(boundary):
        raise ValueError,  ('Invalid boundary in multipart form: %r'
                            % (boundary,))

    nextpart = "--" + boundary
    lastpart = "--" + boundary + "--"
    partdict = {}
    terminator = ""

    while terminator != lastpart:
        bytes = -1
        data = None
        if terminator:
            # At start of next part.  Read headers first.
            headers = mimetools.Message(fp)
            clength = headers.getheader('content-length')
            if clength:
                try:
                    bytes = int(clength)
                except ValueError:
                    pass
            if bytes > 0:
                if maxlen and bytes > maxlen:
                    raise ValueError, 'Maximum content length exceeded'
                data = fp.read(bytes)
            else:
                data = ""
        # Read lines until end of part.
        lines = []
        while 1:
            line = fp.readline()
            if not line:
                terminator = lastpart # End outer loop
                break
            if line[:2] == "--":
                terminator = line.strip()
                if terminator in (nextpart, lastpart):
                    break
            lines.append(line)
        # Done with part.
        if data is None:
            continue
        if bytes < 0:
            if lines:
                # Strip final line terminator
                line = lines[-1]
                if line[-2:] == "\r\n":
                    line = line[:-2]
                elif line[-1:] == "\n":
                    line = line[:-1]
                lines[-1] = line
                data = "".join(lines)
        line = headers['content-disposition']
        if not line:
            continue
        key, params = parse_header(line)
        if key != 'form-data':
            continue
        if 'name' in params:
            name = params['name']
        else:
            continue
        if name in partdict:
            partdict[name].append(data)
        else:
            partdict[name] = [data]

    return partdict

def _parseparam(s):
    while s[:1] == ';':
        s = s[1:]
        end = s.find(';')
        while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2:
            end = s.find(';', end + 1)
        if end < 0:
            end = len(s)
        f = s[:end]
        yield f.strip()
        s = s[end:]

def parse_header(line):
    """Parse a Content-type like header.

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

    """
    parts = _parseparam(';' + line)
    key = parts.next()
    pdict = {}
    for p in parts:
        i = p.find('=')
        if i >= 0:
            name = p[:i].strip().lower()
            value = p[i+1:].strip()
            if len(value) >= 2 and value[0] == value[-1] == '"':
                value = value[1:-1]
                value = value.replace('\\\\', '\\').replace('\\"', '"')
            pdict[name] = value
    return key, pdict


# Classes for field storage
# =========================

class MiniFieldStorage:

    """Like FieldStorage, for use when no file uploads are possible."""

    # Dummy attributes
    filename = None
    list = None
    type = None
    file = None
    type_options = {}
    disposition = None
    disposition_options = {}
    headers = {}

    def __init__(self, name, value):
        """Constructor from field name and value."""
        self.name = name
        self.value = value
        # self.file = StringIO(value)

    def __repr__(self):
        """Return printable representation."""
        return "MiniFieldStorage(%r, %r)" % (self.name, self.value)


class FieldStorage:

    """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

    file: the file(-like) object from which you can read the data;
        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 rfc822.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.

    """

    def __init__(self, fp=None, headers=None, outerboundary="",
                 environ=os.environ, keep_blank_values=0, strict_parsing=0,
                 max_num_fields=None, separator=None):
        """Constructor.  Read multipart/* until last part.

        Arguments, all optional:

        fp              : file pointer; default: sys.stdin
            (not used when the request method is GET)

        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.

        max_num_fields: int. If set, then __init__ throws a ValueError
            if there are more than n fields read by parse_qsl().

        """
        method = 'GET'
        self.keep_blank_values = keep_blank_values
        self.strict_parsing = strict_parsing
        self.max_num_fields = max_num_fields
        self.separator = separator
        if 'REQUEST_METHOD' in environ:
            method = environ['REQUEST_METHOD'].upper()
        self.qs_on_post = None
        if method == 'GET' or method == 'HEAD':
            if 'QUERY_STRING' in environ:
                qs = environ['QUERY_STRING']
            elif sys.argv[1:]:
                qs = sys.argv[1]
            else:
                qs = ""
            fp = StringIO(qs)
            if headers is None:
                headers = {'content-type':
                           "application/x-www-form-urlencoded"}
        if headers is None:
            headers = {}
            if method == 'POST':
                # Set default content-type for POST to what's traditional
                headers['content-type'] = "application/x-www-form-urlencoded"
            if 'CONTENT_TYPE' in environ:
                headers['content-type'] = environ['CONTENT_TYPE']
            if 'QUERY_STRING' in environ:
                self.qs_on_post = environ['QUERY_STRING']
            if 'CONTENT_LENGTH' in environ:
                headers['content-length'] = environ['CONTENT_LENGTH']
        self.fp = fp or sys.stdin
        self.headers = headers
        self.outerboundary = outerboundary

        # Process content-disposition header
        cdisp, pdict = "", {}
        if 'content-disposition' in self.headers:
            cdisp, pdict = parse_header(self.headers['content-disposition'])
        self.disposition = cdisp
        self.disposition_options = pdict
        self.name = None
        if 'name' in pdict:
            self.name = pdict['name']
        self.filename = None
        if 'filename' in pdict:
            self.filename = pdict['filename']

        # Process content-type header
        #
        # Honor any existing content-type header.  But if there is no
        # content-type header, use some sensible defaults.  Assume
        # outerboundary is "" at the outer level, but something non-false
        # inside a multi-part.  The default for an inner part is text/plain,
        # but for an outer part it should be urlencoded.  This should catch
        # bogus clients which erroneously forget to include a content-type
        # header.
        #
        # See below for what we do if there does exist a content-type header,
        # but it happens to be something we don't understand.
        if 'content-type' in self.headers:
            ctype, pdict = parse_header(self.headers['content-type'])
        elif self.outerboundary or method != 'POST':
            ctype, pdict = "text/plain", {}
        else:
            ctype, pdict = 'application/x-www-form-urlencoded', {}
        self.type = ctype
        self.type_options = pdict
        self.innerboundary = ""
        if 'boundary' in pdict:
            self.innerboundary = pdict['boundary']
        clen = -1
        if 'content-length' in self.headers:
            try:
                clen = int(self.headers['content-length'])
            except ValueError:
                pass
            if maxlen and clen > maxlen:
                raise ValueError, 'Maximum content length exceeded'
        self.length = clen

        self.list = self.file = None
        self.done = 0
        if ctype == 'application/x-www-form-urlencoded':
            self.read_urlencoded()
        elif ctype[:10] == 'multipart/':
            self.read_multi(environ, keep_blank_values, strict_parsing)
        else:
            self.read_single()

    def __repr__(self):
        """Return a printable representation."""
        return "FieldStorage(%r, %r, %r)" % (
                self.name, self.filename, self.value)

    def __iter__(self):
        return iter(self.keys())

    def __getattr__(self, name):
        if name != 'value':
            raise AttributeError, name
        if self.file:
            self.file.seek(0)
            value = self.file.read()
            self.file.seek(0)
        elif self.list is not None:
            value = self.list
        else:
            value = None
        return value

    def __getitem__(self, key):
        """Dictionary style indexing."""
        if self.list is None:
            raise TypeError, "not indexable"
        found = []
        for item in self.list:
            if item.name == key: found.append(item)
        if not found:
            raise KeyError, key
        if len(found) == 1:
            return found[0]
        else:
            return found

    def getvalue(self, key, default=None):
        """Dictionary style get() method, including 'value' lookup."""
        if key in self:
            value = self[key]
            if type(value) is type([]):
                return map(attrgetter('value'), value)
            else:
                return value.value
        else:
            return default

    def getfirst(self, key, default=None):
        """ Return the first value received."""
        if key in self:
            value = self[key]
            if type(value) is type([]):
                return value[0].value
            else:
                return value.value
        else:
            return default

    def getlist(self, key):
        """ Return list of received values."""
        if key in self:
            value = self[key]
            if type(value) is type([]):
                return map(attrgetter('value'), value)
            else:
                return [value.value]
        else:
            return []

    def keys(self):
        """Dictionary style keys() method."""
        if self.list is None:
            raise TypeError, "not indexable"
        return list(set(item.name for item in self.list))

    def has_key(self, key):
        """Dictionary style has_key() method."""
        if self.list is None:
            raise TypeError, "not indexable"
        return any(item.name == key for item in self.list)

    def __contains__(self, key):
        """Dictionary style __contains__ method."""
        if self.list is None:
            raise TypeError, "not indexable"
        return any(item.name == key for item in self.list)

    def __len__(self):
        """Dictionary style len(x) support."""
        return len(self.keys())

    def __nonzero__(self):
        return bool(self.list)

    def read_urlencoded(self):
        """Internal: read data in query string format."""
        qs = self.fp.read(self.length)
        if self.qs_on_post:
            qs += '&' + self.qs_on_post
        query = urlparse.parse_qsl(qs, self.keep_blank_values,
                                   self.strict_parsing, self.max_num_fields,
                                   self.separator)
        self.list = [MiniFieldStorage(key, value) for key, value in query]
        self.skip_lines()

    FieldStorageClass = None

    def read_multi(self, environ, keep_blank_values, strict_parsing):
        """Internal: read a part that is itself multipart."""
        ib = self.innerboundary
        if not valid_boundary(ib):
            raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,)
        self.list = []
        if self.qs_on_post:
            query = urlparse.parse_qsl(self.qs_on_post,
                                       self.keep_blank_values,
                                       self.strict_parsing,
                                       self.max_num_fields,
                                       self.separator)
            self.list.extend(MiniFieldStorage(key, value)
                             for key, value in query)
            FieldStorageClass = None

        # Propagate max_num_fields into the sub class appropriately
        max_num_fields = self.max_num_fields
        if max_num_fields is not None:
            max_num_fields -= len(self.list)

        klass = self.FieldStorageClass or self.__class__
        part = klass(self.fp, {}, ib,
                     environ, keep_blank_values, strict_parsing,
                     max_num_fields)

        # Throw first part away
        while not part.done:
            headers = rfc822.Message(self.fp)
            part = klass(self.fp, headers, ib,
                         environ, keep_blank_values, strict_parsing,
                         max_num_fields,
                         separator=self.separator)

            if max_num_fields is not None:
                max_num_fields -= 1
                if part.list:
                    max_num_fields -= len(part.list)
                if max_num_fields < 0:
                    raise ValueError('Max number of fields exceeded')

            self.list.append(part)
        self.skip_lines()

    def read_single(self):
        """Internal: read an atomic part."""
        if self.length >= 0:
            self.read_binary()
            self.skip_lines()
        else:
            self.read_lines()
        self.file.seek(0)

    bufsize = 8*1024            # I/O buffering size for copy to file

    def read_binary(self):
        """Internal: read binary data."""
        self.file = self.make_file('b')
        todo = self.length
        if todo >= 0:
            while todo > 0:
                data = self.fp.read(min(todo, self.bufsize))
                if not data:
                    self.done = -1
                    break
                self.file.write(data)
                todo = todo - len(data)

    def read_lines(self):
        """Internal: read lines until EOF or outerboundary."""
        self.file = self.__file = StringIO()
        if self.outerboundary:
            self.read_lines_to_outerboundary()
        else:
            self.read_lines_to_eof()

    def __write(self, line):
        if self.__file is not None:
            if self.__file.tell() + len(line) > 1000:
                self.file = self.make_file('')
                self.file.write(self.__file.getvalue())
                self.__file = None
        self.file.write(line)

    def read_lines_to_eof(self):
        """Internal: read lines until EOF."""
        while 1:
            line = self.fp.readline(1<<16)
            if not line:
                self.done = -1
                break
            self.__write(line)

    def read_lines_to_outerboundary(self):
        """Internal: read lines until outerboundary."""
        next = "--" + self.outerboundary
        last = next + "--"
        delim = ""
        last_line_lfend = True
        while 1:
            line = self.fp.readline(1<<16)
            if not line:
                self.done = -1
                break
            if delim == "\r":
                line = delim + line
                delim = ""
            if line[:2] == "--" and last_line_lfend:
                strippedline = line.strip()
                if strippedline == next:
                    break
                if strippedline == last:
                    self.done = 1
                    break
            odelim = delim
            if line[-2:] == "\r\n":
                delim = "\r\n"
                line = line[:-2]
                last_line_lfend = True
            elif line[-1] == "\n":
                delim = "\n"
                line = line[:-1]
                last_line_lfend = True
            elif line[-1] == "\r":
                # We may interrupt \r\n sequences if they span the 2**16
                # byte boundary
                delim = "\r"
                line = line[:-1]
                last_line_lfend = False
            else:
                delim = ""
                last_line_lfend = False
            self.__write(odelim + line)

    def skip_lines(self):
        """Internal: skip lines until outer boundary if defined."""
        if not self.outerboundary or self.done:
            return
        next = "--" + self.outerboundary
        last = next + "--"
        last_line_lfend = True
        while 1:
            line = self.fp.readline(1<<16)
            if not line:
                self.done = -1
                break
            if line[:2] == "--" and last_line_lfend:
                strippedline = line.strip()
                if strippedline == next:
                    break
                if strippedline == last:
                    self.done = 1
                    break
            last_line_lfend = line.endswith('\n')

    def make_file(self, binary=None):
        """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 'binary' argument is unused -- the file is always opened
        in binary mode.

        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.

        """
        import tempfile
        return tempfile.TemporaryFile("w+b")



# Backwards Compatibility Classes
# ===============================

class FormContentDict(UserDict.UserDict):
    """Form content as dictionary with a list of values per field.

    form = FormContentDict()

    form[key] -> [value, value, ...]
    key in form -> Boolean
    form.keys() -> [key, key, ...]
    form.values() -> [[val, val, ...], [val, val, ...], ...]
    form.items() ->  [(key, [val, val, ...]), (key, [val, val, ...]), ...]
    form.dict == {key: [val, val, ...], ...}

    """
    def __init__(self, environ=os.environ, keep_blank_values=0, strict_parsing=0, separator=None):
        self.dict = self.data = parse(environ=environ,
                                      keep_blank_values=keep_blank_values,
                                      strict_parsing=strict_parsing,
                                      separator=separator)
        self.query_string = environ['QUERY_STRING']


class SvFormContentDict(FormContentDict):
    """Form content as dictionary expecting a single value per field.

    If you only expect a single value for each field, then form[key]
    will return that single value.  It will raise an IndexError if
    that expectation is not true.  If you expect a field to have
    possible multiple values, than you can use form.getlist(key) to
    get all of the values.  values() and items() are a compromise:
    they return single strings where there is a single value, and
    lists of strings otherwise.

    """
    def __getitem__(self, key):
        if len(self.dict[key]) > 1:
            raise IndexError, 'expecting a single value'
        return self.dict[key][0]
    def getlist(self, key):
        return self.dict[key]
    def values(self):
        result = []
        for value in self.dict.values():
            if len(value) == 1:
                result.append(value[0])
            else: result.append(value)
        return result
    def items(self):
        result = []
        for key, value in self.dict.items():
            if len(value) == 1:
                result.append((key, value[0]))
            else: result.append((key, value))
        return result


class InterpFormContentDict(SvFormContentDict):
    """This class is present for backwards compatibility only."""
    def __getitem__(self, key):
        v = SvFormContentDict.__getitem__(self, key)
        if v[0] in '0123456789+-.':
            try: return int(v)
            except ValueError:
                try: return float(v)
                except ValueError: pass
        return v.strip()
    def values(self):
        result = []
        for key in self.keys():
            try:
                result.append(self[key])
            except IndexError:
                result.append(self.dict[key])
        return result
    def items(self):
        result = []
        for key in self.keys():
            try:
                result.append((key, self[key]))
            except IndexError:
                result.append((key, self.dict[key]))
        return result


class FormContent(FormContentDict):
    """This class is present for backwards compatibility only."""
    def values(self, key):
        if key in self.dict :return self.dict[key]
        else: return None
    def indexed_value(self, key, location):
        if key in self.dict:
            if len(self.dict[key]) > location:
                return self.dict[key][location]
            else: return None
        else: return None
    def value(self, key):
        if key in self.dict: return self.dict[key][0]
        else: return None
    def length(self, key):
        return len(self.dict[key])
    def stripped(self, key):
        if key in self.dict: return self.dict[key][0].strip()
        else: return None
    def pars(self):
        return self.dict


# Test/debug code
# ===============

def test(environ=os.environ):
    """Robust test CGI script, usable as main program.

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

    """
    print "Content-type: text/html"
    print
    sys.stderr = sys.stdout
    try:
        form = FieldStorage()   # Replace with other classes to test those
        print_directory()
        print_arguments()
        print_form(form)
        print_environ(environ)
        print_environ_usage()
        def f():
            exec "testing print_exception() -- <I>italics?</I>"
        def g(f=f):
            f()
        print "<H3>What follows is a test, not an actual exception:</H3>"
        g()
    except:
        print_exception()

    print "<H1>Second try with a small maxlen...</H1>"

    global maxlen
    maxlen = 50
    try:
        form = FieldStorage()   # Replace with other classes to test those
        print_directory()
        print_arguments()
        print_form(form)
        print_environ(environ)
    except:
        print_exception()

def print_exception(type=None, value=None, tb=None, limit=None):
    if type is None:
        type, value, tb = sys.exc_info()
    import traceback
    print
    print "<H3>Traceback (most recent call last):</H3>"
    list = traceback.format_tb(tb, limit) + \
           traceback.format_exception_only(type, value)
    print "<PRE>%s<B>%s</B></PRE>" % (
        escape("".join(list[:-1])),
        escape(list[-1]),
        )
    del tb

def print_environ(environ=os.environ):
    """Dump the shell environment as HTML."""
    keys = environ.keys()
    keys.sort()
    print
    print "<H3>Shell Environment:</H3>"
    print "<DL>"
    for key in keys:
        print "<DT>", escape(key), "<DD>", escape(environ[key])
    print "</DL>"
    print

def print_form(form):
    """Dump the contents of a form as HTML."""
    keys = form.keys()
    keys.sort()
    print
    print "<H3>Form Contents:</H3>"
    if not keys:
        print "<P>No form fields."
    print "<DL>"
    for key in keys:
        print "<DT>" + escape(key) + ":",
        value = form[key]
        print "<i>" + escape(repr(type(value))) + "</i>"
        print "<DD>" + escape(repr(value))
    print "</DL>"
    print

def print_directory():
    """Dump the current directory as HTML."""
    print
    print "<H3>Current Working Directory:</H3>"
    try:
        pwd = os.getcwd()
    except os.error, msg:
        print "os.error:", escape(str(msg))
    else:
        print escape(pwd)
    print

def print_arguments():
    print
    print "<H3>Command Line Arguments:</H3>"
    print
    print sys.argv
    print

def print_environ_usage():
    """Dump a list of environment variables used by CGI as HTML."""
    print """
<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>
"""


# Utilities
# =========

def escape(s, quote=None):
    '''Replace special characters "&", "<" and ">" to HTML-safe sequences.
    If the optional flag quote is true, the quotation mark character (")
    is also translated.'''
    s = s.replace("&", "&amp;") # Must be done first!
    s = s.replace("<", "&lt;")
    s = s.replace(">", "&gt;")
    if quote:
        s = s.replace('"', "&quot;")
    return s

def valid_boundary(s, _vb_pattern="^[ -~]{0,200}[!-~]$"):
    import re
    return re.match(_vb_pattern, s)

# Invoke mainline
# ===============

# Call test() when this file is run as a script (not imported as a module)
if __name__ == '__main__':
    test()
Name
Size
Permissions
Options
Demo
--
drwxr-xr-x
Doc
--
drwxr-xr-x
Tools
--
drwxr-xr-x
bsddb
--
drwxr-xr-x
compiler
--
drwxr-xr-x
config
--
drwxr-xr-x
ctypes
--
drwxr-xr-x
curses
--
drwxr-xr-x
distutils
--
drwxr-xr-x
email
--
drwxr-xr-x
encodings
--
drwxr-xr-x
ensurepip
--
drwxr-xr-x
hotshot
--
drwxr-xr-x
idlelib
--
drwxr-xr-x
importlib
--
drwxr-xr-x
json
--
drwxr-xr-x
lib-dynload
--
drwxr-xr-x
lib-tk
--
drwxr-xr-x
lib2to3
--
drwxr-xr-x
logging
--
drwxr-xr-x
multiprocessing
--
drwxr-xr-x
plat-linux2
--
drwxr-xr-x
pydoc_data
--
drwxr-xr-x
site-packages
--
drwxr-xr-x
sqlite3
--
drwxr-xr-x
test
--
drwxr-xr-x
unittest
--
drwxr-xr-x
wsgiref
--
drwxr-xr-x
xml
--
drwxr-xr-x
BaseHTTPServer.py
22.214 KB
-rw-r--r--
BaseHTTPServer.pyc
21.213 KB
-rw-r--r--
BaseHTTPServer.pyo
21.213 KB
-rw-r--r--
Bastion.py
5.609 KB
-rw-r--r--
Bastion.pyc
6.504 KB
-rw-r--r--
Bastion.pyo
6.504 KB
-rw-r--r--
CGIHTTPServer.py
12.782 KB
-rw-r--r--
CGIHTTPServer.pyc
10.76 KB
-rw-r--r--
CGIHTTPServer.pyo
10.76 KB
-rw-r--r--
ConfigParser.py
27.096 KB
-rw-r--r--
ConfigParser.pyc
24.622 KB
-rw-r--r--
ConfigParser.pyo
24.622 KB
-rw-r--r--
Cookie.py
25.916 KB
-rw-r--r--
Cookie.pyc
22.127 KB
-rw-r--r--
Cookie.pyo
22.127 KB
-rw-r--r--
DocXMLRPCServer.py
10.516 KB
-rw-r--r--
DocXMLRPCServer.pyc
9.956 KB
-rw-r--r--
DocXMLRPCServer.pyo
9.85 KB
-rw-r--r--
HTMLParser.py
16.769 KB
-rw-r--r--
HTMLParser.pyc
13.405 KB
-rw-r--r--
HTMLParser.pyo
13.107 KB
-rw-r--r--
MimeWriter.py
6.33 KB
-rw-r--r--
MimeWriter.pyc
7.191 KB
-rw-r--r--
MimeWriter.pyo
7.191 KB
-rw-r--r--
Queue.py
8.376 KB
-rw-r--r--
Queue.pyc
9.203 KB
-rw-r--r--
Queue.pyo
9.203 KB
-rw-r--r--
SimpleHTTPServer.py
7.81 KB
-rw-r--r--
SimpleHTTPServer.pyc
7.822 KB
-rw-r--r--
SimpleHTTPServer.pyo
7.822 KB
-rw-r--r--
SimpleXMLRPCServer.py
25.207 KB
-rw-r--r--
SimpleXMLRPCServer.pyc
22.327 KB
-rw-r--r--
SimpleXMLRPCServer.pyo
22.327 KB
-rw-r--r--
SocketServer.py
23.387 KB
-rw-r--r--
SocketServer.pyc
23.522 KB
-rw-r--r--
SocketServer.pyo
23.522 KB
-rw-r--r--
StringIO.py
10.412 KB
-rw-r--r--
StringIO.pyc
11.211 KB
-rw-r--r--
StringIO.pyo
11.211 KB
-rw-r--r--
UserDict.py
6.895 KB
-rw-r--r--
UserDict.pyc
9.483 KB
-rw-r--r--
UserDict.pyo
9.483 KB
-rw-r--r--
UserList.py
3.559 KB
-rw-r--r--
UserList.pyc
6.423 KB
-rw-r--r--
UserList.pyo
6.423 KB
-rw-r--r--
UserString.py
9.46 KB
-rwxr-xr-x
UserString.pyc
14.516 KB
-rw-r--r--
UserString.pyo
14.516 KB
-rw-r--r--
_LWPCookieJar.py
6.399 KB
-rw-r--r--
_LWPCookieJar.pyc
5.307 KB
-rw-r--r--
_LWPCookieJar.pyo
5.307 KB
-rw-r--r--
_MozillaCookieJar.py
5.661 KB
-rw-r--r--
_MozillaCookieJar.pyc
4.356 KB
-rw-r--r--
_MozillaCookieJar.pyo
4.318 KB
-rw-r--r--
__future__.py
4.277 KB
-rw-r--r--
__future__.pyc
4.124 KB
-rw-r--r--
__future__.pyo
4.124 KB
-rw-r--r--
__phello__.foo.py
0.063 KB
-rw-r--r--
__phello__.foo.pyc
0.122 KB
-rw-r--r--
__phello__.foo.pyo
0.122 KB
-rw-r--r--
_abcoll.py
18.183 KB
-rw-r--r--
_abcoll.pyc
25.08 KB
-rw-r--r--
_abcoll.pyo
25.08 KB
-rw-r--r--
_osx_support.py
18.652 KB
-rw-r--r--
_osx_support.pyc
11.482 KB
-rw-r--r--
_osx_support.pyo
11.482 KB
-rw-r--r--
_pyio.py
67.998 KB
-rw-r--r--
_pyio.pyc
63.185 KB
-rw-r--r--
_pyio.pyo
63.185 KB
-rw-r--r--
_strptime.py
20.242 KB
-rw-r--r--
_strptime.pyc
14.816 KB
-rw-r--r--
_strptime.pyo
14.816 KB
-rw-r--r--
_sysconfigdata.py
19.27 KB
-rw-r--r--
_sysconfigdata.pyc
22.43 KB
-rw-r--r--
_sysconfigdata.pyo
22.43 KB
-rw-r--r--
_threading_local.py
7.09 KB
-rw-r--r--
_threading_local.pyc
6.224 KB
-rw-r--r--
_threading_local.pyo
6.224 KB
-rw-r--r--
_weakrefset.py
5.772 KB
-rw-r--r--
_weakrefset.pyc
9.451 KB
-rw-r--r--
_weakrefset.pyo
9.451 KB
-rw-r--r--
abc.py
6.978 KB
-rw-r--r--
abc.pyc
5.999 KB
-rw-r--r--
abc.pyo
5.944 KB
-rw-r--r--
aifc.py
33.769 KB
-rw-r--r--
aifc.pyc
29.745 KB
-rw-r--r--
aifc.pyo
29.745 KB
-rw-r--r--
antigravity.py
0.059 KB
-rw-r--r--
antigravity.pyc
0.198 KB
-rw-r--r--
antigravity.pyo
0.198 KB
-rw-r--r--
anydbm.py
2.601 KB
-rw-r--r--
anydbm.pyc
2.734 KB
-rw-r--r--
anydbm.pyo
2.734 KB
-rw-r--r--
argparse.py
87.137 KB
-rw-r--r--
argparse.pyc
62.858 KB
-rw-r--r--
argparse.pyo
62.697 KB
-rw-r--r--
ast.py
11.528 KB
-rw-r--r--
ast.pyc
12.635 KB
-rw-r--r--
ast.pyo
12.635 KB
-rw-r--r--
asynchat.py
11.31 KB
-rw-r--r--
asynchat.pyc
8.604 KB
-rw-r--r--
asynchat.pyo
8.604 KB
-rw-r--r--
asyncore.py
20.452 KB
-rw-r--r--
asyncore.pyc
18.45 KB
-rw-r--r--
asyncore.pyo
18.45 KB
-rw-r--r--
atexit.py
1.665 KB
-rw-r--r--
atexit.pyc
2.151 KB
-rw-r--r--
atexit.pyo
2.151 KB
-rw-r--r--
audiodev.py
7.419 KB
-rw-r--r--
audiodev.pyc
8.271 KB
-rw-r--r--
audiodev.pyo
8.271 KB
-rw-r--r--
base64.py
11.529 KB
-rwxr-xr-x
base64.pyc
11.032 KB
-rw-r--r--
base64.pyo
11.032 KB
-rw-r--r--
bdb.py
21.205 KB
-rw-r--r--
bdb.pyc
18.653 KB
-rw-r--r--
bdb.pyo
18.653 KB
-rw-r--r--
binhex.py
14.354 KB
-rw-r--r--
binhex.pyc
15.098 KB
-rw-r--r--
binhex.pyo
15.098 KB
-rw-r--r--
bisect.py
2.534 KB
-rw-r--r--
bisect.pyc
2.999 KB
-rw-r--r--
bisect.pyo
2.999 KB
-rw-r--r--
cProfile.py
6.419 KB
-rwxr-xr-x
cProfile.pyc
6.245 KB
-rw-r--r--
cProfile.pyo
6.245 KB
-rw-r--r--
calendar.py
22.836 KB
-rw-r--r--
calendar.pyc
27.259 KB
-rw-r--r--
calendar.pyo
27.259 KB
-rw-r--r--
cgi.py
35.457 KB
-rwxr-xr-x
cgi.pyc
32.584 KB
-rw-r--r--
cgi.pyo
32.584 KB
-rw-r--r--
cgitb.py
11.89 KB
-rw-r--r--
cgitb.pyc
11.854 KB
-rw-r--r--
cgitb.pyo
11.854 KB
-rw-r--r--
chunk.py
5.292 KB
-rw-r--r--
chunk.pyc
5.471 KB
-rw-r--r--
chunk.pyo
5.471 KB
-rw-r--r--
cmd.py
14.674 KB
-rw-r--r--
cmd.pyc
13.71 KB
-rw-r--r--
cmd.pyo
13.71 KB
-rw-r--r--
code.py
9.95 KB
-rw-r--r--
code.pyc
10.092 KB
-rw-r--r--
code.pyo
10.092 KB
-rw-r--r--
codecs.py
35.296 KB
-rw-r--r--
codecs.pyc
35.961 KB
-rw-r--r--
codecs.pyo
35.961 KB
-rw-r--r--
codeop.py
5.858 KB
-rw-r--r--
codeop.pyc
6.442 KB
-rw-r--r--
codeop.pyo
6.442 KB
-rw-r--r--
collections.py
27.146 KB
-rw-r--r--
collections.pyc
25.55 KB
-rw-r--r--
collections.pyo
25.5 KB
-rw-r--r--
colorsys.py
3.604 KB
-rw-r--r--
colorsys.pyc
3.897 KB
-rw-r--r--
colorsys.pyo
3.897 KB
-rw-r--r--
commands.py
2.485 KB
-rw-r--r--
commands.pyc
2.411 KB
-rw-r--r--
commands.pyo
2.411 KB
-rw-r--r--
compileall.py
7.581 KB
-rw-r--r--
compileall.pyc
6.853 KB
-rw-r--r--
compileall.pyo
6.853 KB
-rw-r--r--
contextlib.py
4.32 KB
-rw-r--r--
contextlib.pyc
4.35 KB
-rw-r--r--
contextlib.pyo
4.35 KB
-rw-r--r--
cookielib.py
63.951 KB
-rw-r--r--
cookielib.pyc
53.442 KB
-rw-r--r--
cookielib.pyo
53.259 KB
-rw-r--r--
copy.py
11.263 KB
-rw-r--r--
copy.pyc
11.885 KB
-rw-r--r--
copy.pyo
11.795 KB
-rw-r--r--
copy_reg.py
6.811 KB
-rw-r--r--
copy_reg.pyc
5.046 KB
-rw-r--r--
copy_reg.pyo
5.003 KB
-rw-r--r--
crypt.py
2.238 KB
-rw-r--r--
crypt.pyc
2.891 KB
-rw-r--r--
crypt.pyo
2.891 KB
-rw-r--r--
csv.py
16.316 KB
-rw-r--r--
csv.pyc
13.19 KB
-rw-r--r--
csv.pyo
13.19 KB
-rw-r--r--
dbhash.py
0.486 KB
-rw-r--r--
dbhash.pyc
0.701 KB
-rw-r--r--
dbhash.pyo
0.701 KB
-rw-r--r--
decimal.py
216.731 KB
-rw-r--r--
decimal.pyc
168.12 KB
-rw-r--r--
decimal.pyo
168.12 KB
-rw-r--r--
difflib.py
80.396 KB
-rw-r--r--
difflib.pyc
60.447 KB
-rw-r--r--
difflib.pyo
60.397 KB
-rw-r--r--
dircache.py
1.1 KB
-rw-r--r--
dircache.pyc
1.539 KB
-rw-r--r--
dircache.pyo
1.539 KB
-rw-r--r--
dis.py
6.347 KB
-rw-r--r--
dis.pyc
6.082 KB
-rw-r--r--
dis.pyo
6.082 KB
-rw-r--r--
doctest.py
102.632 KB
-rw-r--r--
doctest.pyc
81.677 KB
-rw-r--r--
doctest.pyo
81.396 KB
-rw-r--r--
dumbdbm.py
8.927 KB
-rw-r--r--
dumbdbm.pyc
6.588 KB
-rw-r--r--
dumbdbm.pyo
6.588 KB
-rw-r--r--
dummy_thread.py
4.314 KB
-rw-r--r--
dummy_thread.pyc
5.268 KB
-rw-r--r--
dummy_thread.pyo
5.268 KB
-rw-r--r--
dummy_threading.py
2.738 KB
-rw-r--r--
dummy_threading.pyc
1.255 KB
-rw-r--r--
dummy_threading.pyo
1.255 KB
-rw-r--r--
filecmp.py
9.363 KB
-rw-r--r--
filecmp.pyc
9.396 KB
-rw-r--r--
filecmp.pyo
9.396 KB
-rw-r--r--
fileinput.py
13.424 KB
-rw-r--r--
fileinput.pyc
14.16 KB
-rw-r--r--
fileinput.pyo
14.16 KB
-rw-r--r--
fnmatch.py
3.237 KB
-rw-r--r--
fnmatch.pyc
3.529 KB
-rw-r--r--
fnmatch.pyo
3.529 KB
-rw-r--r--
formatter.py
14.562 KB
-rw-r--r--
formatter.pyc
18.729 KB
-rw-r--r--
formatter.pyo
18.729 KB
-rw-r--r--
fpformat.py
4.621 KB
-rw-r--r--
fpformat.pyc
4.593 KB
-rw-r--r--
fpformat.pyo
4.593 KB
-rw-r--r--
fractions.py
21.865 KB
-rw-r--r--
fractions.pyc
19.249 KB
-rw-r--r--
fractions.pyo
19.249 KB
-rw-r--r--
ftplib.py
37.651 KB
-rw-r--r--
ftplib.pyc
34.12 KB
-rw-r--r--
ftplib.pyo
34.12 KB
-rw-r--r--
functools.py
4.693 KB
-rw-r--r--
functools.pyc
6.474 KB
-rw-r--r--
functools.pyo
6.474 KB
-rw-r--r--
genericpath.py
3.126 KB
-rw-r--r--
genericpath.pyc
3.435 KB
-rw-r--r--
genericpath.pyo
3.435 KB
-rw-r--r--
getopt.py
7.147 KB
-rw-r--r--
getopt.pyc
6.498 KB
-rw-r--r--
getopt.pyo
6.454 KB
-rw-r--r--
getpass.py
5.433 KB
-rw-r--r--
getpass.pyc
4.633 KB
-rw-r--r--
getpass.pyo
4.633 KB
-rw-r--r--
gettext.py
22.135 KB
-rw-r--r--
gettext.pyc
17.582 KB
-rw-r--r--
gettext.pyo
17.582 KB
-rw-r--r--
glob.py
3.041 KB
-rw-r--r--
glob.pyc
2.874 KB
-rw-r--r--
glob.pyo
2.874 KB
-rw-r--r--
gzip.py
18.582 KB
-rw-r--r--
gzip.pyc
14.879 KB
-rw-r--r--
gzip.pyo
14.879 KB
-rw-r--r--
hashlib.py
7.657 KB
-rw-r--r--
hashlib.pyc
6.757 KB
-rw-r--r--
hashlib.pyo
6.757 KB
-rw-r--r--
heapq.py
17.866 KB
-rw-r--r--
heapq.pyc
14.223 KB
-rw-r--r--
heapq.pyo
14.223 KB
-rw-r--r--
hmac.py
4.48 KB
-rw-r--r--
hmac.pyc
4.436 KB
-rw-r--r--
hmac.pyo
4.436 KB
-rw-r--r--
htmlentitydefs.py
17.633 KB
-rw-r--r--
htmlentitydefs.pyc
6.218 KB
-rw-r--r--
htmlentitydefs.pyo
6.218 KB
-rw-r--r--
htmllib.py
12.567 KB
-rw-r--r--
htmllib.pyc
19.833 KB
-rw-r--r--
htmllib.pyo
19.833 KB
-rw-r--r--
httplib.py
52.057 KB
-rw-r--r--
httplib.pyc
37.816 KB
-rw-r--r--
httplib.pyo
37.637 KB
-rw-r--r--
ihooks.py
18.541 KB
-rw-r--r--
ihooks.pyc
20.871 KB
-rw-r--r--
ihooks.pyo
20.871 KB
-rw-r--r--
imaplib.py
47.232 KB
-rw-r--r--
imaplib.pyc
43.956 KB
-rw-r--r--
imaplib.pyo
41.318 KB
-rw-r--r--
imghdr.py
3.458 KB
-rw-r--r--
imghdr.pyc
4.725 KB
-rw-r--r--
imghdr.pyo
4.725 KB
-rw-r--r--
imputil.py
25.16 KB
-rw-r--r--
imputil.pyc
15.257 KB
-rw-r--r--
imputil.pyo
15.083 KB
-rw-r--r--
inspect.py
42 KB
-rw-r--r--
inspect.pyc
39.286 KB
-rw-r--r--
inspect.pyo
39.286 KB
-rw-r--r--
io.py
3.244 KB
-rw-r--r--
io.pyc
3.505 KB
-rw-r--r--
io.pyo
3.505 KB
-rw-r--r--
keyword.py
1.948 KB
-rwxr-xr-x
keyword.pyc
2.056 KB
-rw-r--r--
keyword.pyo
2.056 KB
-rw-r--r--
linecache.py
3.933 KB
-rw-r--r--
linecache.pyc
3.195 KB
-rw-r--r--
linecache.pyo
3.195 KB
-rw-r--r--
locale.py
100.424 KB
-rw-r--r--
locale.pyc
55.283 KB
-rw-r--r--
locale.pyo
55.283 KB
-rw-r--r--
macpath.py
6.142 KB
-rw-r--r--
macpath.pyc
7.501 KB
-rw-r--r--
macpath.pyo
7.501 KB
-rw-r--r--
macurl2path.py
2.667 KB
-rw-r--r--
macurl2path.pyc
2.191 KB
-rw-r--r--
macurl2path.pyo
2.191 KB
-rw-r--r--
mailbox.py
79.336 KB
-rw-r--r--
mailbox.pyc
74.919 KB
-rw-r--r--
mailbox.pyo
74.873 KB
-rw-r--r--
mailcap.py
8.207 KB
-rw-r--r--
mailcap.pyc
7.769 KB
-rw-r--r--
mailcap.pyo
7.769 KB
-rw-r--r--
markupbase.py
14.3 KB
-rw-r--r--
markupbase.pyc
9.05 KB
-rw-r--r--
markupbase.pyo
8.858 KB
-rw-r--r--
md5.py
0.35 KB
-rw-r--r--
md5.pyc
0.369 KB
-rw-r--r--
md5.pyo
0.369 KB
-rw-r--r--
mhlib.py
32.65 KB
-rw-r--r--
mhlib.pyc
32.985 KB
-rw-r--r--
mhlib.pyo
32.985 KB
-rw-r--r--
mimetools.py
7 KB
-rw-r--r--
mimetools.pyc
8.009 KB
-rw-r--r--
mimetools.pyo
8.009 KB
-rw-r--r--
mimetypes.py
20.535 KB
-rw-r--r--
mimetypes.pyc
18.056 KB
-rw-r--r--
mimetypes.pyo
18.056 KB
-rw-r--r--
mimify.py
14.668 KB
-rwxr-xr-x
mimify.pyc
11.72 KB
-rw-r--r--
mimify.pyo
11.72 KB
-rw-r--r--
modulefinder.py
23.888 KB
-rw-r--r--
modulefinder.pyc
18.679 KB
-rw-r--r--
modulefinder.pyo
18.599 KB
-rw-r--r--
multifile.py
4.707 KB
-rw-r--r--
multifile.pyc
5.293 KB
-rw-r--r--
multifile.pyo
5.252 KB
-rw-r--r--
mutex.py
1.834 KB
-rw-r--r--
mutex.pyc
2.457 KB
-rw-r--r--
mutex.pyo
2.457 KB
-rw-r--r--
netrc.py
5.75 KB
-rw-r--r--
netrc.pyc
4.604 KB
-rw-r--r--
netrc.pyo
4.604 KB
-rw-r--r--
new.py
0.596 KB
-rw-r--r--
new.pyc
0.842 KB
-rw-r--r--
new.pyo
0.842 KB
-rw-r--r--
nntplib.py
20.967 KB
-rw-r--r--
nntplib.pyc
20.551 KB
-rw-r--r--
nntplib.pyo
20.551 KB
-rw-r--r--
ntpath.py
18.974 KB
-rw-r--r--
ntpath.pyc
12.821 KB
-rw-r--r--
ntpath.pyo
12.821 KB
-rw-r--r--
nturl2path.py
2.362 KB
-rw-r--r--
nturl2path.pyc
1.772 KB
-rw-r--r--
nturl2path.pyo
1.772 KB
-rw-r--r--
numbers.py
10.077 KB
-rw-r--r--
numbers.pyc
13.684 KB
-rw-r--r--
numbers.pyo
13.684 KB
-rw-r--r--
opcode.py
5.346 KB
-rw-r--r--
opcode.pyc
6.001 KB
-rw-r--r--
opcode.pyo
6.001 KB
-rw-r--r--
optparse.py
59.769 KB
-rw-r--r--
optparse.pyc
52.631 KB
-rw-r--r--
optparse.pyo
52.55 KB
-rw-r--r--
os.py
25.303 KB
-rw-r--r--
os.pyc
25.087 KB
-rw-r--r--
os.pyo
25.087 KB
-rw-r--r--
os2emxpath.py
4.526 KB
-rw-r--r--
os2emxpath.pyc
4.419 KB
-rw-r--r--
os2emxpath.pyo
4.419 KB
-rw-r--r--
pdb.doc
7.729 KB
-rw-r--r--
pdb.py
45.018 KB
-rwxr-xr-x
pdb.pyc
42.646 KB
-rw-r--r--
pdb.pyo
42.646 KB
-rw-r--r--
pickle.py
44.423 KB
-rw-r--r--
pickle.pyc
37.656 KB
-rw-r--r--
pickle.pyo
37.465 KB
-rw-r--r--
pickletools.py
72.776 KB
-rw-r--r--
pickletools.pyc
55.695 KB
-rw-r--r--
pickletools.pyo
54.854 KB
-rw-r--r--
pipes.py
9.357 KB
-rw-r--r--
pipes.pyc
9.09 KB
-rw-r--r--
pipes.pyo
9.09 KB
-rw-r--r--
pkgutil.py
19.769 KB
-rw-r--r--
pkgutil.pyc
18.515 KB
-rw-r--r--
pkgutil.pyo
18.515 KB
-rw-r--r--
platform.py
51.563 KB
-rwxr-xr-x
platform.pyc
37.081 KB
-rw-r--r--
platform.pyo
37.081 KB
-rw-r--r--
plistlib.py
15.439 KB
-rw-r--r--
plistlib.pyc
19.495 KB
-rw-r--r--
plistlib.pyo
19.411 KB
-rw-r--r--
popen2.py
8.219 KB
-rw-r--r--
popen2.pyc
8.813 KB
-rw-r--r--
popen2.pyo
8.772 KB
-rw-r--r--
poplib.py
12.523 KB
-rw-r--r--
poplib.pyc
13.032 KB
-rw-r--r--
poplib.pyo
13.032 KB
-rw-r--r--
posixfile.py
7.815 KB
-rw-r--r--
posixfile.pyc
7.473 KB
-rw-r--r--
posixfile.pyo
7.473 KB
-rw-r--r--
posixpath.py
13.958 KB
-rw-r--r--
posixpath.pyc
11.193 KB
-rw-r--r--
posixpath.pyo
11.193 KB
-rw-r--r--
pprint.py
11.501 KB
-rw-r--r--
pprint.pyc
9.955 KB
-rw-r--r--
pprint.pyo
9.782 KB
-rw-r--r--
profile.py
22.247 KB
-rwxr-xr-x
profile.pyc
16.07 KB
-rw-r--r--
profile.pyo
15.829 KB
-rw-r--r--
pstats.py
26.086 KB
-rw-r--r--
pstats.pyc
24.427 KB
-rw-r--r--
pstats.pyo
24.427 KB
-rw-r--r--
pty.py
4.939 KB
-rw-r--r--
pty.pyc
4.85 KB
-rw-r--r--
pty.pyo
4.85 KB
-rw-r--r--
py_compile.py
5.797 KB
-rw-r--r--
py_compile.pyc
6.277 KB
-rw-r--r--
py_compile.pyo
6.277 KB
-rw-r--r--
pyclbr.py
13.074 KB
-rw-r--r--
pyclbr.pyc
9.425 KB
-rw-r--r--
pyclbr.pyo
9.425 KB
-rw-r--r--
pydoc.py
93.495 KB
-rwxr-xr-x
pydoc.pyc
90.178 KB
-rw-r--r--
pydoc.pyo
90.115 KB
-rw-r--r--
quopri.py
6.805 KB
-rwxr-xr-x
quopri.pyc
6.42 KB
-rw-r--r--
quopri.pyo
6.42 KB
-rw-r--r--
random.py
31.696 KB
-rw-r--r--
random.pyc
25.102 KB
-rw-r--r--
random.pyo
25.102 KB
-rw-r--r--
re.py
13.108 KB
-rw-r--r--
re.pyc
13.099 KB
-rw-r--r--
re.pyo
13.099 KB
-rw-r--r--
repr.py
4.195 KB
-rw-r--r--
repr.pyc
5.259 KB
-rw-r--r--
repr.pyo
5.259 KB
-rw-r--r--
rexec.py
19.676 KB
-rw-r--r--
rexec.pyc
23.249 KB
-rw-r--r--
rexec.pyo
23.249 KB
-rw-r--r--
rfc822.py
32.756 KB
-rw-r--r--
rfc822.pyc
31.067 KB
-rw-r--r--
rfc822.pyo
31.067 KB
-rw-r--r--
rlcompleter.py
5.851 KB
-rw-r--r--
rlcompleter.pyc
5.936 KB
-rw-r--r--
rlcompleter.pyo
5.936 KB
-rw-r--r--
robotparser.py
7.515 KB
-rw-r--r--
robotparser.pyc
7.815 KB
-rw-r--r--
robotparser.pyo
7.815 KB
-rw-r--r--
runpy.py
10.821 KB
-rw-r--r--
runpy.pyc
8.597 KB
-rw-r--r--
runpy.pyo
8.597 KB
-rw-r--r--
sched.py
4.969 KB
-rw-r--r--
sched.pyc
4.877 KB
-rw-r--r--
sched.pyo
4.877 KB
-rw-r--r--
sets.py
18.604 KB
-rw-r--r--
sets.pyc
16.499 KB
-rw-r--r--
sets.pyo
16.499 KB
-rw-r--r--
sgmllib.py
17.465 KB
-rw-r--r--
sgmllib.pyc
15.074 KB
-rw-r--r--
sgmllib.pyo
15.074 KB
-rw-r--r--
sha.py
0.384 KB
-rw-r--r--
sha.pyc
0.411 KB
-rw-r--r--
sha.pyo
0.411 KB
-rw-r--r--
shelve.py
7.986 KB
-rw-r--r--
shelve.pyc
10.016 KB
-rw-r--r--
shelve.pyo
10.016 KB
-rw-r--r--
shlex.py
10.902 KB
-rw-r--r--
shlex.pyc
7.381 KB
-rw-r--r--
shlex.pyo
7.381 KB
-rw-r--r--
shutil.py
19.405 KB
-rw-r--r--
shutil.pyc
18.808 KB
-rw-r--r--
shutil.pyo
18.808 KB
-rw-r--r--
site.py
20.797 KB
-rw-r--r--
site.pyc
20.299 KB
-rw-r--r--
site.pyo
20.299 KB
-rw-r--r--
smtpd.py
18.107 KB
-rwxr-xr-x
smtpd.pyc
15.511 KB
-rw-r--r--
smtpd.pyo
15.511 KB
-rw-r--r--
smtplib.py
31.381 KB
-rwxr-xr-x
smtplib.pyc
29.594 KB
-rw-r--r--
smtplib.pyo
29.594 KB
-rw-r--r--
sndhdr.py
5.833 KB
-rw-r--r--
sndhdr.pyc
7.188 KB
-rw-r--r--
sndhdr.pyo
7.188 KB
-rw-r--r--
socket.py
20.132 KB
-rw-r--r--
socket.pyc
15.773 KB
-rw-r--r--
socket.pyo
15.689 KB
-rw-r--r--
sre.py
0.375 KB
-rw-r--r--
sre.pyc
0.507 KB
-rw-r--r--
sre.pyo
0.507 KB
-rw-r--r--
sre_compile.py
19.358 KB
-rw-r--r--
sre_compile.pyc
12.266 KB
-rw-r--r--
sre_compile.pyo
12.113 KB
-rw-r--r--
sre_constants.py
7.028 KB
-rw-r--r--
sre_constants.pyc
6.05 KB
-rw-r--r--
sre_constants.pyo
6.05 KB
-rw-r--r--
sre_parse.py
29.98 KB
-rw-r--r--
sre_parse.pyc
20.66 KB
-rw-r--r--
sre_parse.pyo
20.66 KB
-rw-r--r--
ssl.py
38.389 KB
-rw-r--r--
ssl.pyc
31.949 KB
-rw-r--r--
ssl.pyo
31.949 KB
-rw-r--r--
stat.py
1.799 KB
-rw-r--r--
stat.pyc
2.687 KB
-rw-r--r--
stat.pyo
2.687 KB
-rw-r--r--
statvfs.py
0.877 KB
-rw-r--r--
statvfs.pyc
0.605 KB
-rw-r--r--
statvfs.pyo
0.605 KB
-rw-r--r--
string.py
21.043 KB
-rw-r--r--
string.pyc
19.979 KB
-rw-r--r--
string.pyo
19.979 KB
-rw-r--r--
stringold.py
12.157 KB
-rw-r--r--
stringold.pyc
12.255 KB
-rw-r--r--
stringold.pyo
12.255 KB
-rw-r--r--
stringprep.py
13.205 KB
-rw-r--r--
stringprep.pyc
14.147 KB
-rw-r--r--
stringprep.pyo
14.077 KB
-rw-r--r--
struct.py
0.08 KB
-rw-r--r--
struct.pyc
0.233 KB
-rw-r--r--
struct.pyo
0.233 KB
-rw-r--r--
subprocess.py
49.336 KB
-rw-r--r--
subprocess.pyc
31.639 KB
-rw-r--r--
subprocess.pyo
31.639 KB
-rw-r--r--
sunau.py
16.818 KB
-rw-r--r--
sunau.pyc
17.963 KB
-rw-r--r--
sunau.pyo
17.963 KB
-rw-r--r--
sunaudio.py
1.366 KB
-rw-r--r--
sunaudio.pyc
1.94 KB
-rw-r--r--
sunaudio.pyo
1.94 KB
-rw-r--r--
symbol.py
2.009 KB
-rwxr-xr-x
symbol.pyc
2.955 KB
-rw-r--r--
symbol.pyo
2.955 KB
-rw-r--r--
symtable.py
7.263 KB
-rw-r--r--
symtable.pyc
11.51 KB
-rw-r--r--
symtable.pyo
11.382 KB
-rw-r--r--
sysconfig.py
22.316 KB
-rw-r--r--
sysconfig.pyc
17.4 KB
-rw-r--r--
sysconfig.pyo
17.4 KB
-rw-r--r--
tabnanny.py
11.073 KB
-rwxr-xr-x
tabnanny.pyc
8.054 KB
-rw-r--r--
tabnanny.pyo
8.054 KB
-rw-r--r--
tarfile.py
88.53 KB
-rw-r--r--
tarfile.pyc
74.407 KB
-rw-r--r--
tarfile.pyo
74.407 KB
-rw-r--r--
telnetlib.py
26.402 KB
-rw-r--r--
telnetlib.pyc
22.611 KB
-rw-r--r--
telnetlib.pyo
22.611 KB
-rw-r--r--
tempfile.py
19.089 KB
-rw-r--r--
tempfile.pyc
19.867 KB
-rw-r--r--
tempfile.pyo
19.867 KB
-rw-r--r--
textwrap.py
16.875 KB
-rw-r--r--
textwrap.pyc
11.813 KB
-rw-r--r--
textwrap.pyo
11.724 KB
-rw-r--r--
this.py
0.979 KB
-rw-r--r--
this.pyc
1.191 KB
-rw-r--r--
this.pyo
1.191 KB
-rw-r--r--
threading.py
46.267 KB
-rw-r--r--
threading.pyc
41.725 KB
-rw-r--r--
threading.pyo
39.602 KB
-rw-r--r--
timeit.py
12.491 KB
-rwxr-xr-x
timeit.pyc
11.897 KB
-rw-r--r--
timeit.pyo
11.897 KB
-rw-r--r--
toaiff.py
3.068 KB
-rw-r--r--
toaiff.pyc
3.033 KB
-rw-r--r--
toaiff.pyo
3.033 KB
-rw-r--r--
token.py
2.854 KB
-rw-r--r--
token.pyc
3.727 KB
-rw-r--r--
token.pyo
3.727 KB
-rw-r--r--
tokenize.py
17.073 KB
-rw-r--r--
tokenize.pyc
14.165 KB
-rw-r--r--
tokenize.pyo
14.11 KB
-rw-r--r--
trace.py
29.19 KB
-rwxr-xr-x
trace.pyc
22.259 KB
-rw-r--r--
trace.pyo
22.197 KB
-rw-r--r--
traceback.py
11.021 KB
-rw-r--r--
traceback.pyc
11.405 KB
-rw-r--r--
traceback.pyo
11.405 KB
-rw-r--r--
tty.py
0.858 KB
-rw-r--r--
tty.pyc
1.286 KB
-rw-r--r--
tty.pyo
1.286 KB
-rw-r--r--
types.py
2.045 KB
-rw-r--r--
types.pyc
2.661 KB
-rw-r--r--
types.pyo
2.661 KB
-rw-r--r--
urllib.py
58.816 KB
-rw-r--r--
urllib.pyc
50.04 KB
-rw-r--r--
urllib.pyo
49.947 KB
-rw-r--r--
urllib2.py
51.31 KB
-rw-r--r--
urllib2.pyc
46.193 KB
-rw-r--r--
urllib2.pyo
46.101 KB
-rw-r--r--
urlparse.py
19.981 KB
-rw-r--r--
urlparse.pyc
17.593 KB
-rw-r--r--
urlparse.pyo
17.593 KB
-rw-r--r--
user.py
1.589 KB
-rw-r--r--
user.pyc
1.684 KB
-rw-r--r--
user.pyo
1.684 KB
-rw-r--r--
uu.py
6.54 KB
-rwxr-xr-x
uu.pyc
4.287 KB
-rw-r--r--
uu.pyo
4.287 KB
-rw-r--r--
uuid.py
22.979 KB
-rw-r--r--
uuid.pyc
22.818 KB
-rw-r--r--
uuid.pyo
22.705 KB
-rw-r--r--
warnings.py
14.476 KB
-rw-r--r--
warnings.pyc
13.193 KB
-rw-r--r--
warnings.pyo
12.423 KB
-rw-r--r--
wave.py
18.146 KB
-rw-r--r--
wave.pyc
19.544 KB
-rw-r--r--
wave.pyo
19.403 KB
-rw-r--r--
weakref.py
14.482 KB
-rw-r--r--
weakref.pyc
16.056 KB
-rw-r--r--
weakref.pyo
16.056 KB
-rw-r--r--
webbrowser.py
22.192 KB
-rwxr-xr-x
webbrowser.pyc
19.287 KB
-rw-r--r--
webbrowser.pyo
19.243 KB
-rw-r--r--
whichdb.py
3.3 KB
-rw-r--r--
whichdb.pyc
2.188 KB
-rw-r--r--
whichdb.pyo
2.188 KB
-rw-r--r--
wsgiref.egg-info
0.183 KB
-rw-r--r--
xdrlib.py
5.927 KB
-rw-r--r--
xdrlib.pyc
9.67 KB
-rw-r--r--
xdrlib.pyo
9.67 KB
-rw-r--r--
xmllib.py
34.048 KB
-rw-r--r--
xmllib.pyc
26.219 KB
-rw-r--r--
xmllib.pyo
26.219 KB
-rw-r--r--
xmlrpclib.py
50.914 KB
-rw-r--r--
xmlrpclib.pyc
43.072 KB
-rw-r--r--
xmlrpclib.pyo
42.893 KB
-rw-r--r--
zipfile.py
58.083 KB
-rw-r--r--
zipfile.pyc
41.149 KB
-rw-r--r--
zipfile.pyo
41.149 KB
-rw-r--r--