Using Python as a CGI script without the CGI module?

Posted by kilometer on Stack Overflow See other posts from Stack Overflow or by kilometer
Published on 2010-04-21T03:31:04Z Indexed on 2010/04/21 3:33 UTC
Read the original article Hit count: 277

Filed under:
|

Is it possible to use Python as CGI without using the CGI module and still get access to all of the browser information and everything?

I tried:

#!/usr/bin/python
import sys
print "Content-type: text/html"
print
data = sys.stdin.readlines()
print len(data)

but it always prints 0.

© Stack Overflow or respective owner

Related posts about python

Related posts about cgi