Add two CGI example and basic Python CGI server.
This commit is contained in:
parent
74a63c004f
commit
101d8bc9c3
4 changed files with 25 additions and 0 deletions
11
examples/cgi/cgi_server.py
Normal file
11
examples/cgi/cgi_server.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
import BaseHTTPServer
|
||||
import CGIHTTPServer
|
||||
|
||||
server = BaseHTTPServer.HTTPServer
|
||||
handler = CGIHTTPServer.CGIHTTPRequestHandler
|
||||
server_address = ('localhost', 8008)
|
||||
handler.cgi_directories = ['/']
|
||||
|
||||
httpd = server(server_address, handler)
|
||||
httpd.serve_forever()
|
||||
Loading…
Add table
Add a link
Reference in a new issue