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 urllib2.HttpError, etc.
>
> > works fine. Now, I still don't understand why these classes shouldn't
> > automatically work....
>
> IOError is a standard Python exception. HTTPError & URLError are
> exceptions provided by the urllib2 module. They need to be imported
> from or referenced through urllib2 to be used.

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 URLError.  Sorry for being dense about this
(I'm very new to Python).. Again, thanks for your help.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to