Sulsa <[EMAIL PROTECTED]> writes: > On Tue, 15 Aug 2006 03:37:02 -0000 > Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2006-08-15, Sulsa <[EMAIL PROTECTED]> wrote: > > > > > I want to fill only one smiple form so i would like not to use > > > any non standard libraries. > > > > Then just send the HTTP "POST" request containing the fields > > and data you want to submit. > > but i don't know how to post these data if i knew there there would > be no topic.
Something like this (UNTESTED, and I can never remember all the details, which are fiddlier than they may look): import urllib, urllib2 query = urllib.urlencode([ ("username", "sulsa"), ("password", "sulsa"), ("redirect", ""), ("login", "Login"), ]) r = urllib2.urlopen("http://example.com/login.php", query) print r.read() Note that urllib and urllib2 both, as their main job in life, open URLs. urllib also has miscellaneous functions related to URLs &c. I use urllib2 above because I know it better and because it can handle some stuff that urllib doesn't (it's designed more for extensibility than is urllib). John -- http://mail.python.org/mailman/listinfo/python-list