Re: CGI module does not parse data

2005-12-18 Thread Tim Roberts
"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

Re: CGI module does not parse data

2005-12-16 Thread Devan L
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

Re: CGI module does not parse data

2005-12-16 Thread Steve Holden
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

Re: CGI module does not parse data

2005-12-16 Thread amfr
Neither work -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI module does not parse data

2005-12-04 Thread Mardy
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

Re: CGI module does not parse data

2005-12-03 Thread Tim Roberts
"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

Re: CGI module does not parse data

2005-12-02 Thread amfr
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

Re: CGI module does not parse data

2005-12-02 Thread Mardy
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

Re: CGI module does not parse data

2005-12-01 Thread Peter Hansen
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

Re: CGI module does not parse data

2005-12-01 Thread amfr
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

Re: CGI module does not parse data

2005-12-01 Thread amfr
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

Re: CGI module does not parse data

2005-12-01 Thread Fredrik Lundh
"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

CGI module does not parse data

2005-12-01 Thread amfr
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