how-to POST form data to ASP pages?

livin livin at
Mon Dec 26 21:33:33 EST 2005


I need to post form data to an ASP page that looks like this on the page 
itself...

<form method='POST'><input src=\icons\devices\coffee-on.gif type='image' 
align='absmiddle' width=16 height=16 title='Off'><input type='hidden' 
value='Image' name='Action'><input type='hidden' value='hs.ExecX10ByName 
"Kitchen Espresso Machine", "Off", 100'></form>

I've been trying this but I get a syntax error...
      params = urllib.urlencode({'hidden': 'hs.ExecX10ByName "Kitchen 
Espresso Machine", "On", 100'})
      urllib.urlopen("http://192.168.1.11:80/hact/kitchen.asp", params)

Can someone help out and validate I'm on the right/wrong track and help with 
the syntax?

thanks!







More information about the Python-list mailing list