Commit 98804727 authored by Georg Brandl's avatar Georg Brandl

Merged revisions 82433 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82433 | georg.brandl | 2010-07-02 09:33:50 +0200 (Fr, 02 Jul 2010) | 1 line

  Grammar and markup fixes.
........
parent abad9009
...@@ -284,9 +284,10 @@ of which this module provides three different variants: ...@@ -284,9 +284,10 @@ of which this module provides three different variants:
For example usage, see the implementation of the :func:`test` function For example usage, see the implementation of the :func:`test` function
invocation in the :mod:`http.server` module. invocation in the :mod:`http.server` module.
The :class:`SimpleHTTPRequestHandler` class can be invoked the following manner
with the :mod:`http.server` to create a very basic webserver serving files The :class:`SimpleHTTPRequestHandler` class can be used in the following
relative to the current directory.:: manner in order to create a very basic webserver serving files relative to
the current directory. ::
import http.server import http.server
import socketserver import socketserver
...@@ -300,14 +301,13 @@ relative to the current directory.:: ...@@ -300,14 +301,13 @@ relative to the current directory.::
print("serving at port", PORT) print("serving at port", PORT)
httpd.serve_forever() httpd.serve_forever()
:mod:`http.server` can also be invoked directly using the ``-m`` switch of :mod:`http.server` can also be invoked directly using the :cmdoption:`-m`
interpreter a with ``port number`` argument which uses switch of the interpreter a with ``port number`` argument. Similar to
:class:`SimpleHTTPRequestHandler` as the default request Handler. Similar to the previous example, this serves files relative to the current directory. ::
the previous example, even this serves files relative to the current
directory.::
python -m http.server 8000 python -m http.server 8000
.. class:: CGIHTTPRequestHandler(request, client_address, server) .. class:: CGIHTTPRequestHandler(request, client_address, server)
This class is used to serve either files or output of CGI scripts from the This class is used to serve either files or output of CGI scripts from the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment