python cgi problem with method = post
phil
interstar at postmaster.co.uk
Sun Oct 5 01:36:39 EDT 2003
I'm still struggling with the mysterious problem of FieldStorage and
method = Post.
However, I've noticed something which might solve my problem but is
very strange. My CGI script :
#! /usr/bin/python
import cgi
print """Content-type: %s
""" % 'text/html'
print "<html><body>Hello World<p>\n"
print cgi.FieldStorage()
print "<br>"
b = cgi.FieldStorage()
print b
print "</body></html>"
And the result :
Hello World
FieldStorage(None, None, [MiniFieldStorage('title', 'hello world'),
MiniFieldStorage('excerpt', 'strange')])
FieldStorage(None, None, [])
So I take it that the first call to FieldStorage wipes out the data
for any subsequent calls? Is this right? Don't see it documented
anywhere?
If I have worked out the puzzle, do I now win my secret Python Decoder
Ring?
phil jones
More information about the Python-list
mailing list