mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
Grammar and markup fixes.
This commit is contained in:
parent
8a08ce25e2
commit
0ada39cd8b
1 changed files with 17 additions and 16 deletions
|
@ -82,15 +82,15 @@ The :mod:`SimpleHTTPServer` module defines the following class:
|
||||||
``text/`` the file is opened in text mode; otherwise binary mode is used.
|
``text/`` the file is opened in text mode; otherwise binary mode is used.
|
||||||
|
|
||||||
The :func:`test` function in the :mod:`SimpleHTTPServer` module is an
|
The :func:`test` function in the :mod:`SimpleHTTPServer` module is an
|
||||||
example which creates a server using the
|
example which creates a server using the :class:`SimpleHTTPRequestHandler`
|
||||||
:class:`SimpleHTTPRequestHandler` as the Handler.
|
as the Handler.
|
||||||
|
|
||||||
.. versionadded:: 2.5
|
.. versionadded:: 2.5
|
||||||
The ``'Last-Modified'`` header.
|
The ``'Last-Modified'`` header.
|
||||||
|
|
||||||
|
|
||||||
The :mod:`SimpleHTTPServer` module can be used the following manner in order to
|
The :mod:`SimpleHTTPServer` module can be used in the following manner in order
|
||||||
set up a very basic web server serving files relative to the current
|
to set up a very basic web server serving files relative to the current
|
||||||
directory. ::
|
directory. ::
|
||||||
|
|
||||||
import SimpleHTTPServer
|
import SimpleHTTPServer
|
||||||
|
@ -105,9 +105,10 @@ directory.::
|
||||||
print "serving at port", PORT
|
print "serving at port", PORT
|
||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
|
|
||||||
:mod:`SimpleHTTPServer` module can also be invoked directly using the ``-m``
|
The :mod:`SimpleHTTPServer` module can also be invoked directly using the
|
||||||
switch of interpreter with a ``port number`` argument. Similar to previous
|
:cmdoption:`-m` switch of the interpreter with a ``port number`` argument.
|
||||||
example, this serves the files relative to the current directory.::
|
Similar to the previous example, this serves the files relative to the
|
||||||
|
current directory. ::
|
||||||
|
|
||||||
python -m SimpleHTTPServer 8000
|
python -m SimpleHTTPServer 8000
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue