python CGI scripting

J

jai_uw

Hello,

I am trying to do CGI scripting with Python, but I have a slight
constraint. I do not have the CGI module installed on my machine. Is
there anyway I can still do CGI scripting in Python without the CGI
module installed?

I don't have root access to the linux machine I am on, and so I won't
be able to install the Python CGI module. All I need to do is access
the text box fields of an html form in a Python script. The CGI
module makes this really easy, as we can import CGI, but I was
wondering if anyone knows a way to do this without using the CGI
module. Any input would be greatly appreciated.

Thanks,

Jai Modi
 
M

Michael Rentzsch

Am Tue, 04 May 2004 05:56:06 +0000 schrieb jai_uw:
Hello,

I am trying to do CGI scripting with Python, but I have a slight
constraint. I do not have the CGI module installed on my machine. Is
there anyway I can still do CGI scripting in Python without the CGI
module installed?

I don't have root access to the linux machine I am on, and so I won't
be able to install the Python CGI module. All I need to do is access
the text box fields of an html form in a Python script. The CGI
module makes this really easy, as we can import CGI, but I was
wondering if anyone knows a way to do this without using the CGI
module. Any input would be greatly appreciated.

Thanks,

Jai Modi

Hello,

of course, this is possible: if you use the GET method (in your html
<form> tag) the submitted data will be saved in the environment variable
QUERY_STRING. If you use POST the data can be read from your cgi's stdin.
In either case you have to decode the data. See:
http://hoohoo.ncsa.uiuc.edu/cgi/forms.html

Anyway, I'm sure there is a possibility to install the cgi module locally,
see:
http://www.python.org/doc/current/tut/node8.html
and search for PYTHONPATH.

Michael Rentzsch
 
F

Fernando

jai_uw said:
Hello,

I am trying to do CGI scripting with Python, but I have a slight
constraint. I do not have the CGI module installed on my machine. Is
there anyway I can still do CGI scripting in Python without the CGI
module installed?

I don't have root access to the linux machine I am on, and so I won't
be able to install the Python CGI module. All I need to do is access
the text box fields of an html form in a Python script. The CGI
module makes this really easy, as we can import CGI, but I was
wondering if anyone knows a way to do this without using the CGI
module. Any input would be greatly appreciated.

Thanks,

Jai Modi
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top