~pythonregexp2.7/python/issue2636-09-01+10

« back to all changes in this revision

Viewing changes to Doc/library/urllib.rst

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 21:39:45 UTC
  • mfrom: (39055.1.33 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922213945-23717m5eiqpamcyn
Merged in changes from the Single-Loop Engine branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
.. module:: urllib
5
5
   :synopsis: Open an arbitrary network resource by URL (requires sockets).
6
6
 
 
7
.. note::
 
8
    The :mod:`urllib` module has been split into parts and renamed in
 
9
    Python 3.0 to :mod:`urllib.request`, :mod:`urllib.parse`,
 
10
    and :mod:`urllib.error`. The :term:`2to3` tool will automatically adapt
 
11
    imports when converting your sources to 3.0.
 
12
    Also note that the :func:`urllib.urlopen` function has been removed in
 
13
    Python 3.0 in favor of :func:`urllib2.urlopen`.
7
14
 
8
15
.. index::
9
16
   single: WWW
116
123
   .. versionchanged:: 2.6
117
124
      Added :meth:`getcode` to returned object and support for the
118
125
      :envvar:`no_proxy` environment variable.
 
126
      
 
127
   .. deprecated:: 2.6
 
128
      The :func:`urlopen` function has been removed in Python 3.0 in favor
 
129
      of :func:`urllib2.urlopen`.
119
130
 
120
131
 
121
132
.. function:: urlretrieve(url[, filename[, reporthook[, data]]])
231
242
   of the sequence. When a sequence of two-element tuples is used as the *query*
232
243
   argument, the first element of each tuple is a key and the second is a value.
233
244
   The order of parameters in the encoded string will match the order of parameter
234
 
   tuples in the sequence. The :mod:`cgi` module provides the functions
 
245
   tuples in the sequence. The :mod:`urlparse` module provides the functions
235
246
   :func:`parse_qs` and :func:`parse_qsl` which are used to parse query strings
236
247
   into Python data structures.
237
248