Simple Python CGI Server

Ein einfacher HTTP-Server mit CGI-Unterstützung in Python

Eine Datei server.py mit folgendem Inhalt anlegen:

#!/usr/bin/env python

import BaseHTTPServer
import CGIHTTPServer
import cgitb; cgitb.enable()  ## This line enables CGI error reporting

server = BaseHTTPServer.HTTPServer
handler = CGIHTTPServer.CGIHTTPRequestHandler
server_address = ("", 8080)
handler.cgi_directories = [""]

httpd = server(server_address, handler)
httpd.serve_forever()

Die Datei ausführbar machen und starten!