Downloading:
Create a directory somewhere, and call it PythonWebServer. Then download the appropriate Python-based web server from correct link below and unzip it into the new directory. When unzipping, be sure to allow the creation of new directories. When done, you should have 2 new directories beneath PythonWebServer called html-stuff and cgi-bin with some files already in each of them. If that's not the case, redo the unzipping to fix that. In the future: put your .html files (those that do not involve any Python programs) into the html-stuff directory and the python programs (and all of the files they need/open) that the web server should execute into the cgi-bin directory. |
Running the Web Server:
Find the PythonWebServer directory (using a file manager), and double-click on the file: PythonWebServer.py. A black window should come up, with the words: "Started CGI Server..." If that doesn't happen, then for some reason, Windows can't execute your python programs automatically. Try to fix that, if you can. |
Check:
In your browser (e.g. Firefox, Chrome, Safari, etc), go to the following web page: "http://localhost:9000". You should see a web page that will step you through some tests. If you don't, then there's trouble in webserverland. |
Shutdown the Web Server:
In the black window where you started the web server, there should be a record of all of the pages it served. Press Ctrl-C (^C). That should shut down the server. |