you have the overall design in mind running this examples the html pages and cgi scripts of pymailcgi can be installed on any web server to which you have access to keep things simple for this bookthoughwe're going to use the same policy as in --we'll be running the python-coded webserver py script from example - locallyon the same machine as the web browser client as we learned at the start of the prior that means we'll be using the server domain name "localhost(or the equivalent ip address "to access this system' pages in our browseras well as in the urllib request module start this server script on your own machine to test-drive the program ultimatelythis system must generally contact mail server over the internet to fetch or send messagesbut the web page server will be running locally on your computer one minor twist herepymailcgi' code is located in directory of its ownone level down from the webserver py script because of thatwe'll start the web server here with an explicit directory and port number in the command line used to launch itc:\pp \internet\webwebserver py pymailcgi type this sort of command into command prompt window on windows or into your system shell prompt on unix-like platforms when run this waythe server will listen for url requests on machine "localhostand socket port number it will serve up pages from the pymailcgi subdirectory one level below the script' locationand it will run cgi scripts located in the pymailcgi\cgi-bin directory below that this works because the script changes its current working directory to the one you name when it starts up subtle pointbecause we specify unique port number on the command line this wayit' ok if you simultaneously run another instance of the script to serve up the prior examples one directory upthat server instance will accept connections on port and our new instance will handle requests on port in factyou can contact either server from the same browser by specifying the desired server' port number if you have two instances of the server running in the two different directoriesto access pages and scripts of the prior use url of this formand to run this pages and scriptssimply use urls of this formyou'll see that the http and cgi log messages appear in the window of the server you're contacting for more background on why this works as it doessee the the pymailcgi website