~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/howto/urllib2.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
Handling Exceptions
183
183
===================
184
184
 
185
 
*urlopen* raises :exc:`URLError` when it cannot handle a response (though as usual
186
 
with Python APIs, builtin exceptions such as
187
 
:exc:`ValueError`, :exc:`TypeError` etc. may also
188
 
be raised).
 
185
*urlopen* raises :exc:`URLError` when it cannot handle a response (though as
 
186
usual with Python APIs, built-in exceptions such as :exc:`ValueError`,
 
187
:exc:`TypeError` etc. may also be raised).
189
188
 
190
189
:exc:`HTTPError` is the subclass of :exc:`URLError` raised in the specific case of
191
190
HTTP URLs.
488
487
 
489
488
.. note::
490
489
 
491
 
    In the above example we only supplied our ``HHTPBasicAuthHandler`` to
 
490
    In the above example we only supplied our ``HTTPBasicAuthHandler`` to
492
491
    ``build_opener``. By default openers have the handlers for normal situations
493
492
    -- ``ProxyHandler``, ``UnknownHandler``, ``HTTPHandler``,
494
493
    ``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``,