html POST in python

simo simoninusa2001 at yahoo.co.uk
Mon Jun 28 23:00:25 CEST 2004


# create array of name/value pairs
self.params = urllib.urlencode({'user': 'fred', 'password': 'hax0r5'})

# send http-post
request = urllib.urlopen("http://www.domain.com/login.cgi", params)

# read back each line of reply
line = request.readline()



More information about the Python-list mailing list