python CGI scripting

Discussion in 'Python' started by jai_uw, May 4, 2004.

  1. jai_uw

    jai_uw Guest

    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
    jai_uw, May 4, 2004
    #1
    1. Advertising

  2. 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
    --
    Stud. of Computer Science
    www.repc.de
    Michael Rentzsch, May 4, 2004
    #2
    1. Advertising

  3. jai_uw

    Fernando Guest

    jai_uw wrote:

    > 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

    ..
    Fernando, May 4, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mark

    Python for CGI scripting

    mark, Sep 25, 2003, in forum: Python
    Replies:
    1
    Views:
    270
    Rene Pijlman
    Sep 25, 2003
  2. Ron Stephens
    Replies:
    23
    Views:
    2,824
    Ron Stephens
    Apr 12, 2004
  3. DaveInSidney
    Replies:
    0
    Views:
    411
    DaveInSidney
    May 9, 2005
  4. Vlad Dogaru

    Python CGI Scripting Documentation

    Vlad Dogaru, Jul 2, 2006, in forum: Python
    Replies:
    3
    Views:
    336
    per9000
    Jul 3, 2006
  5. Vlad Dogaru

    Python CGI Scripting Documentation

    Vlad Dogaru, Jul 2, 2006, in forum: Python
    Replies:
    3
    Views:
    381
    Vlad Dogaru
    Jul 3, 2006
Loading...

Share This Page