1

Topic: The simple http-server and performance *, py

It is necessary to test a little *.py through the browser (Chrome)
At me it is already launched simple http the server of a python thanks to what through JS I open *.pdf
All works well to the type address

http://localhost:8000

files and directories are displayed.
At start http through cmd:

python-m CGIHTTPServer

Scripts on the way

http://localhost:8000/cgi-bin/test.py

display empty page. Happens nothing.
On the way

http://localhost:8000/py/test.py

the script as the text opens.
At start http through
Through py:

import SimpleHTTPServer
import SocketServer
PORT = 8000
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer. TCPServer (("", PORT), Handler)
print "serving at port", PORT
httpd.serve_forever ()

Scripts on all ways are displayed as the text.
Though here here , successful implementation is for example resulted.
How to fulfill *.py without an additional software of type of deployment Apache, etc.?
Thanks!

2

Re: The simple http-server and performance *, py

c-net;
I apologize!!
Windows 7/8/10
Pyton 2.7
Chrome

3

Re: The simple http-server and performance *, py

c-net;
All turned out. With discovery http through cmd.
The error was in the code of a script! The text coding is incorrectly specified.
Can to whom it is useful.