[Tutor] Passing arguments to CGI script

David david.fockens at gmail.com
Wed Jun 16 03:21:39 CEST 2010

Hi, I'm trying to pass arguments to a python script running on my
webserver. Here is the script:

import cgi
import cgitb
import sys

form = cgi.FieldStorage()
title = form.getvalue("title")
print """Content-type: text/html

print form.keys()
print """</body>

When I run it on the website like
http://mf-doom.com/album.py?title=blah it just prints out an empty
array. Is there something wrong with my code? Or is there something
wrong with the way my server's configured?

More information about the Tutor mailing list