Re: urllib2 and exceptions

2008-09-30 Thread Gabriel Genellina
En Sun, 28 Sep 2008 22:44:20 -0300, robean <[EMAIL PROTECTED]> escribió: Many thanks for your reply. I was simply under the impression that 'import urllib2' would take care of the namespace issue and simply import everything in urlib2, making it unnecessary to have to reference HTTPError and URL

Re: urllib2 and exceptions

2008-09-28 Thread robean
On Sep 28, 5:33 pm, alex23 <[EMAIL PROTECTED]> wrote: > On Sep 29, 5:52 am, robean <[EMAIL PROTECTED]> wrote: > > > Actually, the problem seems to be that IOError is in my namespace, but > > the other error classes are not. So, > > >    except HTTPError, etc. > > > fails, but > > >    except urllib

Re: urllib2 and exceptions

2008-09-28 Thread alex23
On Sep 29, 5:52 am, robean <[EMAIL PROTECTED]> wrote: > Actually, the problem seems to be that IOError is in my namespace, but > the other error classes are not. So, > >    except HTTPError, etc. > > fails, but > >    except urllib2.HttpError, etc. > > works fine. Now, I still don't understand why

Re: urllib2 and exceptions

2008-09-28 Thread robean
On Sep 28, 12:27 pm, robean <[EMAIL PROTECTED]> wrote: > On Sep 28, 12:11 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > > > > > On Sun, Sep 28, 2008 at 11:03 AM, robean <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > > I have a question about using urllib2. > > > > I like urllib2 better than

Re: urllib2 and exceptions

2008-09-28 Thread robean
On Sep 28, 12:11 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Sun, Sep 28, 2008 at 11:03 AM, robean <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > > I have a question about using urllib2. > > > I like urllib2 better than urllib at least in part because it has more > > elaborate support for h

Re: urllib2 and exceptions

2008-09-28 Thread Chris Rebert
On Sun, Sep 28, 2008 at 11:03 AM, robean <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have a question about using urllib2. > > I like urllib2 better than urllib at least in part because it has more > elaborate support for handling errors: there is built in support for > URLError (for faulty urls

urllib2 and exceptions

2008-09-28 Thread robean
Hi everyone, I have a question about using urllib2. I like urllib2 better than urllib at least in part because it has more elaborate support for handling errors: there is built in support for URLError (for faulty urls) and HTTPError (for http errors that might originate from, say, passing an inva