Module Expr Str ImportFrom alias alias Import alias alias ImportFrom alias Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Assign NameStore BinOpAdd Str NameLoad Assign NameStore BinOpAdd Str SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body TryFinally body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Index Num AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeStore NameLoad attr Dict Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str Assign SubscriptStore NameLoad Index Str Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore BinOpAdd Str NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr If CompareIn Str AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Num orelse Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareNotEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareIs AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr orelse Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Assign NameStore Call AttributeLoad NameLoad attr If CompareIn NameLoad NameLoad body Continue If CompareIn BinOpAdd Str NameLoad NameLoad body AugAssignAdd SubscriptStore NameLoad Index BinOpAdd Str NameLoad BinOpAdd Str NameLoad orelse Assign SubscriptStore NameLoad Index BinOpAdd Str NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot Call AttributeLoad NameLoad attr body Return Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Assign NameStore Call NameLoad Print NameLoad Str Print NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body Print NameLoad NameLoad Str Call NameLoad NameLoad Expr Call NameLoad Str ListLoad TupleLoad Str Str Return ListLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Str Num NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Print Str SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Str Import alias Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr
N/A N/A BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21)

This is both an example of how WSGI can be implemented, and a basis for running
simple web applications on a local machine, such as might be done when testing
or debugging an application.  It has not been reviewed for security issues,
however, and we strongly recommend that you use a "real" web server for
production use.

For example usage, see the 'if __name__=="__main__"' block at the end of the
module.  See also the BaseHTTPServer module docs for other API information.
 BaseHTTPServer BaseHTTPRequestHandler HTTPServer N/A urllib sys wsgiref.handlers SimpleHandler N/A __version__ 0.1 N/A __all__ N/A WSGIServer WSGIRequestHandler demo_app make_server N/A server_version N/A WSGIServer/ __version__ N/A sys_version N/A Python/ N/A N/A N/A N/A sys version split N/A 0 N/A software_version N/A N/A server_version sys_version ServerHandler N/A SimpleHandler N/A N/A server_software software_version close N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self request_handler log_request N/A N/A N/A N/A self status split 1 N/A 0 N/A self bytes_sent N/A N/A N/A N/A SimpleHandler close self N/A N/A WSGIServer N/A HTTPServer N/A N/A BaseHTTPServer that implements the Python WSGI protocol N/A application None server_bind N/A N/A self N/A N/A N/A Override server_bind to store the server name. N/A N/A N/A HTTPServer server_bind self N/A N/A N/A self setup_environ N/A setup_environ N/A N/A self N/A N/A N/A env N/A self base_environ N/A N/A N/A env N/A SERVER_NAME N/A self server_name N/A N/A env N/A GATEWAY_INTERFACE CGI/1.1 N/A N/A env N/A SERVER_PORT N/A str N/A self server_port N/A N/A env N/A REMOTE_HOST N/A N/A env N/A CONTENT_LENGTH N/A N/A env N/A SCRIPT_NAME N/A get_app N/A N/A self N/A N/A N/A N/A self application N/A set_app N/A N/A self application N/A N/A N/A N/A self application application N/A N/A WSGIRequestHandler N/A BaseHTTPRequestHandler N/A N/A server_version N/A WSGIServer/ __version__ get_environ N/A N/A self N/A N/A N/A env N/A N/A N/A N/A self server base_environ copy N/A N/A env N/A SERVER_PROTOCOL N/A self request_version N/A N/A env N/A REQUEST_METHOD N/A self command N/A N/A ? N/A self path N/A N/A N/A path query N/A N/A N/A self path split ? 1 N/A N/A N/A path query N/A N/A self path N/A N/A env N/A PATH_INFO N/A N/A urllib unquote path N/A N/A env N/A QUERY_STRING query N/A host N/A N/A self address_string N/A N/A host N/A N/A self client_address N/A 0 N/A N/A N/A env N/A REMOTE_HOST host N/A N/A env N/A REMOTE_ADDR N/A N/A self client_address N/A 0 N/A N/A N/A N/A self headers typeheader None N/A N/A N/A env N/A CONTENT_TYPE N/A N/A self headers type N/A N/A N/A env N/A CONTENT_TYPE N/A N/A self headers typeheader N/A length N/A N/A N/A self headers getheader content-length N/A length N/A N/A N/A env N/A CONTENT_LENGTH length N/A h N/A N/A self headers headers N/A N/A N/A k v N/A N/A h split : 1 N/A k N/A N/A N/A N/A k replace - _ upper N/A v N/A N/A v strip N/A N/A k env N/A N/A N/A N/A N/A HTTP_ k env N/A N/A N/A env N/A N/A HTTP_ k N/A , v N/A N/A N/A env N/A N/A HTTP_ k v N/A env N/A get_stderr N/A N/A self N/A N/A N/A N/A sys stderr N/A handle N/A N/A self N/A N/A N/A Handle a single HTTP request N/A N/A self raw_requestline N/A N/A N/A self rfile readline N/A N/A N/A N/A self parse_request N/A N/A N/A handler N/A ServerHandler N/A self rfile N/A self wfile N/A N/A self get_stderr N/A N/A self get_environ N/A N/A handler request_handler self N/A N/A N/A handler run N/A N/A N/A self server get_app N/A N/A demo_app N/A N/A environ start_response N/A N/A StringIO StringIO N/A stdout N/A StringIO N/A stdout Hello world! N/A stdout N/A h N/A N/A environ items N/A N/A N/A h sort N/A N/A k v h N/A N/A stdout k = N/A repr v N/A N/A start_response 200 OK N/A N/A Content-Type text/plain N/A N/A N/A N/A stdout getvalue N/A make_server N/A N/A host port app server_class handler_class N/A WSGIServer WSGIRequestHandler N/A N/A Create a new WSGI server listening on `host` and `port` for `app` N/A server N/A server_class N/A host port handler_class N/A N/A N/A server set_app app N/A server N/A N/A N/A __name__ __main__ N/A N/A httpd N/A make_server 8000 demo_app N/A sa N/A N/A N/A httpd socket getsockname N/A Serving HTTP on N/A sa N/A 0 port N/A sa N/A 1 ... N/A webbrowser N/A N/A N/A webbrowser open http://localhost:8000/xyz?abc N/A N/A N/A httpd handle_request