server_address=("",PORT)# specify server directory and port number
handler.cgi_directories=["/","/cgi-bin","/htbin"]# where CGI scripts will reside in relation to the `server' directory
print("Starting server...")# outputs a message
httpd=server(server_address,handler)# creates the server, passing it the server address and port number, as well as the CGI handler (httpd stands for HTTP Daemon)
print("serving at port",PORT)# outputs a message
httpd.serve_forever()# puts program in infinite loop so that the server can `serve_forever'