Mercurial > cpython-lru_cache-weakref
diff Doc/library/simplehttpserver.rst @ 62677:ba9cf0df21b0 legacy-trunk
Grammar and markup fixes.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 02 Jul 2010 07:33:50 +0000 |
| parents | c6845e83086f |
| children | 32396e80048f |
line wrap: on
line diff
--- a/Doc/library/simplehttpserver.rst Thu Jul 01 23:35:37 2010 +0000 +++ b/Doc/library/simplehttpserver.rst Fri Jul 02 07:33:50 2010 +0000 @@ -82,34 +82,35 @@ ``text/`` the file is opened in text mode; otherwise binary mode is used. The :func:`test` function in the :mod:`SimpleHTTPServer` module is an - example which creates a server using the - :class:`SimpleHTTPRequestHandler` as the Handler. + example which creates a server using the :class:`SimpleHTTPRequestHandler` + as the Handler. .. versionadded:: 2.5 The ``'Last-Modified'`` header. -The :mod:`SimpleHTTPServer` module can be used the following manner in order to -set up a very basic web server serving files relative to the current -directory.:: +The :mod:`SimpleHTTPServer` module can be used in the following manner in order +to set up a very basic web server serving files relative to the current +directory. :: - import SimpleHTTPServer - import SocketServer + import SimpleHTTPServer + import SocketServer - PORT = 8000 + PORT = 8000 - Handler = SimpleHTTPServer.SimpleHTTPRequestHandler + Handler = SimpleHTTPServer.SimpleHTTPRequestHandler - httpd = SocketServer.TCPServer(("", PORT), Handler) + httpd = SocketServer.TCPServer(("", PORT), Handler) - print "serving at port", PORT - httpd.serve_forever() + print "serving at port", PORT + httpd.serve_forever() -:mod:`SimpleHTTPServer` module can also be invoked directly using the ``-m`` -switch of interpreter with a ``port number`` argument. Similar to previous -example, this serves the files relative to the current directory.:: +The :mod:`SimpleHTTPServer` module can also be invoked directly using the +:cmdoption:`-m` switch of the interpreter with a ``port number`` argument. +Similar to the previous example, this serves the files relative to the +current directory. :: - python -m SimpleHTTPServer 8000 + python -m SimpleHTTPServer 8000 .. seealso::
