Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Python Programming Language

How to get HTTP error when using urlretrieve()


Hi,

I use urlretrieve to retrieve resources from a http server.
Can you please tell me how can I get the HTTP error (whenever
happens)?

And what kind of different exception urlretrieve will throw? e.g.
unknown host? connection timeout? HTTP error?

Thank you.

silverburgh.me@gmail.com <silverburgh.me@gmail.com> wrote:
> Hi,

> I use urlretrieve to retrieve resources from a http server.
> Can you please tell me how can I get the HTTP error (whenever
> happens)?

> And what kind of different exception urlretrieve will throw? e.g.
> unknown host? connection timeout? HTTP error?

I think <http://www.python.org/doc//lib/module-urllib.html> gives good
information about these issues.

Alex

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc