URLLIB2 EXCEPTION
bart
e_viola at libero.it
Sun Nov 17 11:40:45 EST 2002
Andrew Markebo wrote:
> / 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
>
I have check member msg and it return the info error message. Example
'not found'.
Other member I don't think that are useful to resolve my problem.
Perhaps fp attribute because I don't know it. Do you know its uselfulness?
Thanks to help me...
- Ennio -
More information about the Python-list
mailing list