Get CGI Fields from URL Python

Posted by user299196 on Stack Overflow See other posts from Stack Overflow or by user299196
Published on 2010-03-22T16:43:25Z Indexed on 2010/03/22 16:51 UTC
Read the original article Hit count: 341

Filed under:
|
|
|

When using the cgi module in Python, I can't seem to figure out how to extract CGI variables in the URL. For example if the url servercgi.py?name=user , how do I get 'name' after import cgi? For some reason, form.getvalue and form['user'] do not work but if I print the object, I see something like FieldStorage(None, None, [MiniFieldStoreage('name', 'user')]).

© Stack Overflow or respective owner

Related posts about python

Related posts about cgi