You could use the builtin modules like urllib2, httplib, or you could use John Lee's spifftastic module "mechanize". I use mechanize a lot for automating downloading files from various partner websites my company has relations with.
http://docs.python.org/lib/module-httplib.html http://docs.python.org/lib/module-urllib2.html http://wwwsearch.sourceforge.net/mechanize/ Good luck. Eric Culpepper [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Tremblay Sent: Tuesday, March 08, 2005 10:21 AM To: python tutor Subject: [Tutor] getting a webpage via python Is there a simple way to get a web page with python? I have done no network programming with python before. My router (a Linksys 54G model) stores the IP/MAC addresss in a web page. There is no way for me to access them except through the web. Righ now, I am using this code: command = 'lynx -reload -auth %s:%s -source http://%s/DHCPTable.asp > %s' % ( self.__log_name, self.__log_password, self.__router_address, temp_out1) (exit_status, out_text) = commands.getstatusoutput(command) The lynx terminal browser dumps the raw HTML page to the out_text, and I can then parse it. I would like to make the code independent of lynx, if possible. Thanks Paul -- ************************ *Paul Tremblay * [EMAIL PROTECTED] * ************************ _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor