today that do naturallythis may change over time running local web server to keep things simplethis edition is taking different approach all the examples will be run using simple web server coded in python itself moreoverthe web server will be run on the same local machine as the web browser client this wayall you have to do to run the server-side examples is start the web server script and use "localhostas the server name in all the urls you will submit or code (see if you've forgotten why this name means the local machinefor exampleto view web pageuse url of this form in the address field of your web browserthis also avoids some of the complexity of per-server differencesand it makes changing the code simple--it can be edited on the local machine directly for this book' exampleswe'll use the web server in example - this is essentially the same script introduced in augmented slightly to allow the working directory and port number to be passed in as command-line arguments (we'll also run this in the root directory of larger example in the next we won' go into details on all the modules and classes example - uses heresee the python library manual but as described in this script implements an http web serverwhichlistens for incoming socket requests from clients on the machine it is run on and the port number specified in the script or command line (which defaults to that standard http portserves up html pages from the webdir directory specified in the script or command line (which defaults to the directory it is launched fromruns python cgi scripts that are located in the cgi-bin (or htbinsubdirectory of the webdir directorywith py filename extension see for additional background on this web server' operation example - pp \internet\web\webserver py ""implement an http web server in python which knows how to serve html pages and run server-side cgi scripts coded in pythonthis is not production-grade server ( no httpsslow script launch/run on some platforms)but suffices for testingespecially on localhostserves files and scripts from the current working dir and port by defaultunless these options are specified in command-line argumentspython cgi scripts must be stored in webdir\cgi-bin or webdir\htbinmore than one of this server may be running on the same machine to serve from different directoriesas long as they listen on different portsrunning server-side examples