URLLIB2 EXCEPTION

Andrew Markebo andrew.markebo at telia.com
Sun Nov 17 05:18:51 EST 2002


/ bart <e_viola at libero.it> wrote:
| I use function urllopen to connect to http web page. When resource
| doesn't present in location, urllopen returns exception. The web
| server, in this occasion, generates a page to communicate the error,
| but urlopen doesn't return it.
>
| What can I do to receive error page source code by urlopen?

Hmm doesn't the exception have this info? I think like member msg of
the exception.. 

Otherwise you have to dig into what urlopen does, and do the calls to
functions in urllib2 yourself. Not too hard if you know python a
little ;-)

       /Andy

-- 
 The eye of the beholder rests on the beauty!



More information about the Python-list mailing list