how to append cgi FieldStorage Class instance

Steve Holden steve at holdenweb.com
Fri Jul 29 05:16:31 EDT 2005


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
> 
You can't do that to a FieldStorage instance: it represents user input 
and is therefore not intended to be writable.

What exactly are you trying to achieve - some kind of default value?

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/




More information about the Python-list mailing list