Re: how to append cgi FieldStorage Class instance
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: how to append cgi FieldStorage Class instance

From: praba kar <prabapython@yahoo.co.in>
Date: Fri Jul 29 2005 - 12:05:55 CEST

--- Fuzzyman <fuzzyman@gmail.com> wrote:

>
> praba kar wrote:
> > Dear All,
> > I have doubt in python cgi script. I describe
> > that doubt with below code
> > import cgi
> > form = cgi.FieldStorage()
> > passwd = form['passwd'].value
> > print passwd
> > But Now I want to assign some value to
> form['passwd']
> > field value
> > form['passwd'] = 'surese'
> > Now If I try to print
> > print form['passwd'].value. It will raise error.
> > So kinldy let me how to edit or append instance
> > of FieldStorage class
> >
>
> A form *isn't* a dictionary, this means that your
> code :
> form['passwd'] = 'surese'
>
> is wrong.
> Turn the form into a dictionary and use that.

How Can I convert a form instance into dictionary
Kindly let me know.

Why are you trying to assign values directly in the
form ?
       
      To reduce variable usage in my project.
regards
Prabahar

                
__________________________________________________________
How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos http://in.photos.yahoo.com
Received on Thu Sep 29 17:13:47 2005