"amfr" <[EMAIL PROTECTED]> wrote:
>
>Neither work
Yes, they do.
Post your form HTML and the Python code you're using, and we'll show you
what you're doing wrong.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
amfr wrote:
> I am writing a webserver, and I want it to be able to run python
> scripts. But when I set sys.stdin to self.rfile (using the
> BaseHTTPServer class, self.rfile is a input stream containing the
> request), the cgi module does not parse the data.
> Example script:
> import cgi
> form
amfr wrote:
> Neither work
>
But you don't give us any further information to go on.
Are you importing cgitb and calling cgitb.enable() to trap and print any
errors that might occur?
Are you looking in the browser at the HTM source (view source) of the
page your server is returning to see more
Neither work
--
http://mail.python.org/mailman/listinfo/python-list
Le die Fri, 02 Dec 2005 12:18:28 -0800, amfr ha scribite:
> import cgi
> form = cgi.FieldStorage()
> print form["test"]
> print "test"
>
> I would only be able to see "test", not "hello world"
> I am sure its not my browser
As Tim said, you have tu use "form['test'].value", because "print
form['t
"amfr" <[EMAIL PROTECTED]> wrote:
>
>import cgi
>form = cgi.FieldStorage()
>print form["test"]
>print "test"
>
>I would only be able to see "test", not "hello world"
>I am sure its not my browser
Did you mean:
print form["test"].value
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelhe
I am using execfile, setting stdin and stdout like this:
sys.stdin = self.wfile
sys.stdout = self.rfile
execfile(filename)
Its the same code used in the CGIHTTPServer module. I know that the
python is executing corretly, a script with this content would work:
print ""
print ""
print ""
print "bl
Le die Thu, 01 Dec 2005 15:08:14 -0800, amfr ha scribite:
> I have included some of the content of that file, I am writing this as
> an extension to my ebserver which is based on BaseHTTPServer. This
> part of the code was taken directly from the CGIHTTPServer file,
> nothing changed
I did the s
amfr wrote:
> I just read somewhere that the CGIHTTPServer module does not work on
> mac (which I am currently using), is this true?
It might help a lot if you could include a link to "somewhere", so we'd
know what "does not work" meant... often it means one particular feature
is not perfect, as
I just read somewhere that the CGIHTTPServer module does not work on
mac (which I am currently using), is this true?
--
http://mail.python.org/mailman/listinfo/python-list
I have included some of the content of that file, I am writing this as
an extension to my ebserver which is based on BaseHTTPServer. This
part of the code was taken directly from the CGIHTTPServer file,
nothing changed
--
http://mail.python.org/mailman/listinfo/python-list
"amfr" wrot3e:
> I am writing a webserver, and I want it to be able to run python
> scripts. But when I set sys.stdin to self.rfile (using the
> BaseHTTPServer class, self.rfile is a input stream containing the
> request), the cgi module does not parse the data.
> Example script:
> import cgi
> f
I am writing a webserver, and I want it to be able to run python
scripts. But when I set sys.stdin to self.rfile (using the
BaseHTTPServer class, self.rfile is a input stream containing the
request), the cgi module does not parse the data.
Example script:
import cgi
form = cgi.FieldStorage()
print
13 matches
Mail list logo