Python CGIHTTPServer Default Directories
问题 I've got the following minimal code for a CGI-handling HTTP server, derived from several examples on the inner-tubes: #!/usr/bin/env python import BaseHTTPServer import CGIHTTPServer import cgitb; cgitb.enable() # Error reporting server = BaseHTTPServer.HTTPServer handler = CGIHTTPServer.CGIHTTPRequestHandler server_address = ("", 8000) handler.cgi_directories = [""] httpd = server(server_address, handler) httpd.serve_forever() Yet, when I execute the script and try to run a test script in