Skip to content

Commit ef985ef

Browse files
committed
Grammar and markup fixes.
1 parent 09203c1 commit ef985ef

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

Doc/library/simplehttpserver.rst

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,34 +82,35 @@ The :mod:`SimpleHTTPServer` module defines the following class:
8282
``text/`` the file is opened in text mode; otherwise binary mode is used.
8383

8484
The :func:`test` function in the :mod:`SimpleHTTPServer` module is an
85-
example which creates a server using the
86-
:class:`SimpleHTTPRequestHandler` as the Handler.
85+
example which creates a server using the :class:`SimpleHTTPRequestHandler`
86+
as the Handler.
8787

8888
.. versionadded:: 2.5
8989
The ``'Last-Modified'`` header.
9090

9191

92-
The :mod:`SimpleHTTPServer` module can be used the following manner in order to
93-
set up a very basic web server serving files relative to the current
94-
directory.::
92+
The :mod:`SimpleHTTPServer` module can be used in the following manner in order
93+
to set up a very basic web server serving files relative to the current
94+
directory. ::
9595

96-
import SimpleHTTPServer
97-
import SocketServer
96+
import SimpleHTTPServer
97+
import SocketServer
9898

99-
PORT = 8000
99+
PORT = 8000
100100

101-
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
101+
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
102102

103-
httpd = SocketServer.TCPServer(("", PORT), Handler)
103+
httpd = SocketServer.TCPServer(("", PORT), Handler)
104104

105-
print "serving at port", PORT
106-
httpd.serve_forever()
105+
print "serving at port", PORT
106+
httpd.serve_forever()
107107

108-
:mod:`SimpleHTTPServer` module can also be invoked directly using the ``-m``
109-
switch of interpreter with a ``port number`` argument. Similar to previous
110-
example, this serves the files relative to the current directory.::
108+
The :mod:`SimpleHTTPServer` module can also be invoked directly using the
109+
:cmdoption:`-m` switch of the interpreter with a ``port number`` argument.
110+
Similar to the previous example, this serves the files relative to the
111+
current directory. ::
111112

112-
python -m SimpleHTTPServer 8000
113+
python -m SimpleHTTPServer 8000
113114

114115
.. seealso::
115116

0 commit comments

Comments
 (0)