Test1/PythonHTTP.py

15 lines
327 B
Python
Raw Permalink Normal View History

2020-11-23 17:23:05 +01:00
import BaseHTTPServer
import CGIHTTPServer
import cgitb; cgitb.enable()
server = BaseHTTPServer.HTTPServer
handler = CGIHTTPServer.CGIHTTPRequestHandler
server_address = ('',8000)
handler.cgi_directories = ['/info-mon']
#handler.cgi_directories = ["/cgi-bin/"]
httpd = server(server_address, handler)
httpd.serve_forever()