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. Why are you trying to assign values directly in the form ? Best Regards, Fuzzy http://www.voidspace.org.uk/python > regards > PRabahar > > > > > _______________________________________________________ > Too much spam in your inbox? Yahoo! Mail gives you the best spam protection > for FREE! http://in.mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list