Using CGI module with 'canned queries'

Lars von Wedel lvw at lfpt.rwth-aachen.de
Wed Apr 19 04:28:46 EDT 2000


Hello,

I want to use Python to implement some CGI scripts. I want these
scripts to be callable from any link (not only via a form),
e.g. the user shall be able to enter something like

http://.../test.py?name=Bill

into Netscape directly.

I expected that such a URL could be processed using

    form = cgi.FieldStorage()    print '<UL>'
    for k in form.keys:
	print '<LI>' % k % ':' % form[k] % '</LI>'

(after printing an html header of course).

However, the dictionary seems to be empty when the http daemon
starts my script.

How do I access parameters within the script if not started via a form?

Lars




More information about the Python-list mailing list