cgi post question

Jeff jam at quark.emich.edu
Thu Sep 16 15:46:20 EDT 1999


On Thu, Sep 16, 1999 at 12:08:23PM -0400, Felicia Neff wrote:
> Yes, this is yet another newbie question:
> 
> I am trying to write a CGI script that takes input from a POST, modifies
> some of the input and then POSTs that info to another CGI script.  I know
> that perl has a function that will do this.  Is there such a function in
> python (and if it is do_POST() from the CGIHTTPServer module, is there any
> more documentation besides that at
> http://www.python.org/doc/current/lib/module-CGIHTTPServer.html?)?
> 
> Thanks -- Felicia
> 

hmm.. well, I can't offer any code that I've written to do this, but my
suggestion would be to use the built-in libraries as much as possible. if
you are using cgi scripts via apache or something, most of the work is
already done for you-- iirc, you get the POST data on 'sys.stdin'.. you can
simply call 'sys.stdin.read()' and pass it into the FieldStorage class or
something.

my advise would be to get something working in it's simplest form before
adding features like posting the results of one form into another.

questions: what are you trying to accomplish? a poll system? some kind of
order system? why do you need to modify the data and pass it to another
module? can you do it all inline to simplify the process a little?

other than the newsgroups, the documentation on python.org is indeed 'all'
of the documentation.. what specifically about using that module do you not
understand? is the problem with the module itself or with how it's
documented?

regards,
J
-- 
|| visit gfd <http://quark.newimage.com/> 
|| psa member #293 <http://www.python.org/> 
|| New Image Systems & Services, Inc. <http://www.newimage.com/>




More information about the Python-list mailing list