Module Expr Str Assign NameStore Str Assign NameStore ListLoad Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore BinOpAdd Str NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str BinOpAdd AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Return NameLoad For NameStore TupleLoad Str Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad Break orelse Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Num Str Return NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num Str Return NameLoad Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore NameStore NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIn NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Return SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A Simple HTTP Server.

This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.

 N/A __version__ 0.6 N/A __all__ N/A SimpleHTTPRequestHandler N/A os N/A posixpath N/A BaseHTTPServer N/A urllib N/A cgi N/A shutil N/A mimetypes N/A N/A cStringIO StringIO N/A N/A N/A ImportError N/A StringIO StringIO SimpleHTTPRequestHandler N/A N/A BaseHTTPServer BaseHTTPRequestHandler N/A N/A Simple HTTP request handler with GET and HEAD commands.

    This serves files from the current directory and any of its
    subdirectories.  The MIME type for files is determined by
    calling the .guess_type() method.

    The GET and HEAD requests are identical except that the HEAD
    request omits the actual contents of the file.

     N/A server_version N/A SimpleHTTP/ __version__ do_GET N/A N/A self N/A N/A N/A Serve a GET request. N/A f N/A N/A self send_head N/A f N/A N/A N/A N/A self copyfile f N/A self wfile N/A N/A N/A f close N/A do_HEAD N/A N/A self N/A N/A N/A Serve a HEAD request. N/A f N/A N/A self send_head N/A f N/A N/A N/A N/A f close N/A send_head N/A N/A self N/A N/A N/A Common code for GET and HEAD commands.

        This sends the response code and MIME headers.

        Return value is either a file object (which has to be copied
        to the outputfile by the caller unless the command was HEAD,
        and must be closed by the caller under all circumstances), or
        None, in which case the caller has nothing further to do.

         N/A path N/A N/A self translate_path N/A self path N/A f None N/A N/A N/A N/A os path isdir path N/A N/A N/A N/A N/A N/A self path endswith / N/A N/A N/A N/A self send_response 301 N/A N/A N/A self send_header Location N/A N/A self path / N/A N/A N/A self end_headers N/A None N/A index N/A index.html index.htm N/A N/A index N/A N/A N/A os path join path index N/A N/A N/A N/A os path exists index N/A N/A path index N/A N/A N/A N/A N/A self list_directory path N/A ctype N/A N/A self guess_type path N/A N/A N/A f N/A open path rb N/A N/A N/A IOError N/A N/A N/A N/A self send_error 404 File not found N/A None N/A N/A N/A self send_response 200 N/A N/A N/A self send_header Content-type ctype N/A fs N/A N/A os fstat N/A N/A f fileno N/A N/A N/A self send_header Content-Length N/A str N/A fs N/A 6 N/A N/A N/A self send_header Last-Modified N/A N/A self date_time_string N/A fs st_mtime N/A N/A N/A self end_headers N/A f N/A list_directory N/A N/A self path N/A N/A N/A Helper to produce a directory listing (absent index.html).

        Return value is either a file object, or None (indicating an
        error).  In either case, the headers are sent, making the
        interface the same as for send_head().

         N/A N/A N/A list N/A N/A os listdir path N/A N/A N/A N/A os error N/A N/A N/A N/A self send_error 404 No permission to list directory N/A None N/A N/A N/A list sort key N/A N/A N/A a N/A N/A N/A a lower N/A f N/A StringIO N/A displaypath N/A N/A cgi escape N/A N/A urllib unquote N/A self path N/A N/A N/A f write <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> N/A N/A N/A f write N/A <html>
<title>Directory listing for %s</title>
 displaypath N/A N/A N/A f write N/A <body>
<h2>Directory listing for %s</h2>
 displaypath N/A N/A N/A f write <hr>
<ul>
 N/A name list N/A N/A fullname N/A N/A N/A os path join path name N/A displayname linkname name N/A N/A N/A N/A os path isdir fullname N/A N/A displayname N/A name / N/A linkname N/A name / N/A N/A N/A N/A os path islink fullname N/A N/A displayname N/A name @ N/A N/A N/A f write N/A <li><a href="%s">%s</a>
 N/A N/A N/A urllib quote linkname N/A N/A cgi escape displayname N/A N/A N/A f write </ul>
<hr>
</body>
</html>
 N/A length N/A N/A f tell N/A N/A N/A f seek 0 N/A N/A N/A self send_response 200 N/A N/A N/A self send_header Content-type text/html N/A N/A N/A self send_header Content-Length N/A str length N/A N/A N/A self end_headers N/A f N/A translate_path N/A N/A self path N/A N/A N/A Translate a /-separated PATH to the local filename syntax.

        Components that mean special things to the local file system
        (e.g. drive or directory names) are ignored.  (XXX They should
        probably be diagnosed.)

         N/A path N/A N/A N/A path split ? 1 N/A 0 N/A path N/A N/A N/A path split # 1 N/A 0 N/A path N/A N/A posixpath normpath N/A N/A urllib unquote path N/A words N/A N/A path split / N/A words N/A filter None words N/A path N/A N/A os getcwd N/A word words N/A N/A N/A drive word N/A N/A N/A os path splitdrive word N/A N/A head word N/A N/A N/A os path split word N/A N/A word N/A N/A os curdir N/A os pardir N/A N/A N/A path N/A N/A N/A os path join path word N/A path N/A copyfile N/A N/A self source outputfile N/A N/A N/A Copy all data between two file objects.

        The SOURCE argument is a file object open for reading
        (or anything with a read() method) and the DESTINATION
        argument is a file object open for writing (or
        anything with a write() method).

        The only reason for overriding this would be to change
        the block size or perhaps to replace newlines by CRLF
        -- note however that this the default server uses this
        to copy binary data as well.

         N/A N/A N/A shutil copyfileobj source outputfile N/A guess_type N/A N/A self path N/A N/A N/A Guess the type of a file.

        Argument is a PATH (a filename).

        Return value is a string of the form type/subtype,
        usable for a MIME Content-type header.

        The default implementation looks the file's extension
        up in the table self.extensions_map, using application/octet-stream
        as a default; however it would be permissible (if
        slow) to look inside the data to make a better guess.

         N/A N/A base ext N/A N/A posixpath splitext path N/A N/A ext N/A self extensions_map N/A N/A N/A N/A self extensions_map N/A ext N/A ext N/A N/A ext lower N/A N/A ext N/A self extensions_map N/A N/A N/A N/A self extensions_map N/A ext N/A N/A N/A N/A self extensions_map N/A N/A N/A N/A N/A mimetypes inited N/A N/A N/A N/A mimetypes init N/A extensions_map N/A N/A N/A mimetypes types_map copy N/A N/A N/A extensions_map update N/A .py .c .h application/octet-stream text/plain text/plain text/plain N/A test N/A N/A HandlerClass ServerClass N/A SimpleHTTPRequestHandler N/A BaseHTTPServer HTTPServer N/A N/A N/A N/A BaseHTTPServer test HandlerClass ServerClass N/A N/A N/A __name__ __main__ N/A N/A N/A test