[Tutor] Is Python powerful enough for this?

Kalle Svensson kalle@gnupung.net
Thu, 30 Aug 2001 17:47:11 +0200

> Hi,
> I have some webpages that contain FORMS. Each form has input 
> fields and also some hidden fields. 
> How can I easily get urlencoded string from all these fields
> like
> Key1=Value1&Key2=Value2&Key3=Value3

Use the cgi module.  From the FieldStorage class there, you can get all the
fields and format them as an URL-encoded string if you want to.  Perhaps you
can get the raw string from somewhere within cgi too, but I'm not sure.

[  kalle@gnupung.net  ][ Thought control, brought to you by the WIPO! ]
[ http://gnupung.net/ ][ http://anti-dmca.org/ http://eurorights.org/ ]