[Zope] How do I get remote http error code?

Duane Raymond Duane.Raymond@Virgin.net
Wed, 20 Nov 2002 13:54:03 -0000


Hi,

I'm struggling to find a way to return the http error code (i.e. 404, 401,
301, 201) using an External Script and urllib.

I can read the file using urllib.urlopen(url).read() and can get general
info using  urllib.urlopen(url).info() - however I can't find how to return
the error code (i.e if the remote page doesn't exist).

Anyone know how to resolve this?

Cheers,

Duane