[medusa] Re: Trouble with the CGI

rprice@u... rprice@u...
Mon, 16 Apr 2001 16:16:49 -0700 (PDT)


I have never used it from within medusa. I use the old bobo code to interact
with my Python scripts.

Ray

Quoting lucifer@e...:

> I've written my own code to replace cgi.Fieldstorage() but I don't
> know if it will be ok for you.
> 
> Has anybody ever got cgi.FieldStorage() to work inside medusa ?
> 
> 
> --- In medusa@y..., Ernesto Nadir Crespo Avila <ecrespo@u...> wrote:
> > 
> > 
> > El Mar 10 Abr 2001 12:24, escribiste:
> > > It's been a while since I've workd with cgi.py but I believe your
> problem
> > > is in reading datos['name']. Try datos['name'].value instead. 
> > > datos['name'] may contain a list or string, so adapt your code
> accordingly.
> > Thank you.
> > 
> > But, now just appear:
> > 
> > there´s no data
> > 
> > And
> > 
> > FieldStorage(None, None, []) 
> > 
> > Bye, Ernesto Crespo
> > 
> > 
> > # -*- Mode: Python; tab-width: 4 -*-
> > # send and process a POST form
> > import cgi
> > 
> > print '<html>'
> > print '<head>'
> > print '<meta http-equiv="Content-type" content="text/html">'
> > print
> > print '<title> A Cgi example with Phyton</title>'
> > print '</head>'
> > print '<body>'
> > datos = cgi.FieldStorage()
> > 
> > if datos.has_key('name'):
> > print '<h1> Your data: %s</h1>' %datos['name'].value
> > else:
> > print '<h1>there´s no data</h1>'
> > print datos
> > print '</body>'
> > print '</html>'
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 
>