[Python-checkins] python/dist/src/Doc/lib liburllib.tex,1.45,1.46
bcannon@users.sourceforge.net
bcannon@users.sourceforge.net
Wed, 23 Apr 2003 19:31:17 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv29940/Doc/lib
Modified Files:
liburllib.tex
Log Message:
Fixed docs for urlretrieve() to match code in the case of opening a local file.
Also some typos and removed trailing whitespace on the lines.
Index: liburllib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** liburllib.tex 9 Mar 2003 05:33:32 -0000 1.45
--- liburllib.tex 24 Apr 2003 02:31:14 -0000 1.46
***************
*** 62,66 ****
\var{data} argument may be given to specify a \code{POST} request
(normally the request type is \code{GET}). The \var{data} argument
! must in standard \mimetype{application/x-www-form-urlencoded} format;
see the \function{urlencode()} function below.
--- 62,66 ----
\var{data} argument may be given to specify a \code{POST} request
(normally the request type is \code{GET}). The \var{data} argument
! must be in standard \mimetype{application/x-www-form-urlencoded} format;
see the \function{urlencode()} function below.
***************
*** 79,83 ****
\end{verbatim}
! In a Windows environment, if no proxy envvironment variables are set,
proxy settings are obtained from the registry's Internet Settings
section.
--- 79,83 ----
\end{verbatim}
! In a Windows environment, if no proxy environment variables are set,
proxy settings are obtained from the registry's Internet Settings
section.
***************
*** 101,105 ****
filehandle = urllib.urlopen(some_url, proxies=None)
filehandle = urllib.urlopen(some_url)
! \end{verbatim}
The \function{urlopen()} function does not support explicit proxy
--- 101,105 ----
filehandle = urllib.urlopen(some_url, proxies=None)
filehandle = urllib.urlopen(some_url)
! \end{verbatim}
The \function{urlopen()} function does not support explicit proxy
***************
*** 120,127 ****
\code{(\var{filename}, \var{headers})} where \var{filename} is the
local file name under which the object can be found, and \var{headers}
! is either \code{None} (for a local object) or whatever the
! \method{info()} method of the object returned by \function{urlopen()}
! returned (for a remote object, possibly cached). Exceptions are the
! same as for \function{urlopen()}.
The second argument, if present, specifies the file location to copy
--- 120,126 ----
\code{(\var{filename}, \var{headers})} where \var{filename} is the
local file name under which the object can be found, and \var{headers}
! is whatever the \method{info()} method of the object returned by
! \function{urlopen()} returned (for a remote object, possibly cached).
! Exceptions are the same as for \function{urlopen()}.
The second argument, if present, specifies the file location to copy
***************
*** 132,136 ****
count of blocks transferred so far, a block size in bytes, and the
total size of the file. The third argument may be \code{-1} on older
! FTP servers which do not return a file size in response to a retrieval
request.
--- 131,135 ----
count of blocks transferred so far, a block size in bytes, and the
total size of the file. The third argument may be \code{-1} on older
! FTP servers which do not return a file size in response to a retrieval
request.
***************
*** 173,177 ****
\begin{funcdesc}{quote}{string\optional{, safe}}
Replace special characters in \var{string} using the \samp{\%xx} escape.
! Letters, digits, and the characters \character{_,.-} are never quoted.
The optional \var{safe} parameter specifies additional characters
that should not be quoted --- its default value is \code{'/'}.
--- 172,176 ----
\begin{funcdesc}{quote}{string\optional{, safe}}
Replace special characters in \var{string} using the \samp{\%xx} escape.
! Letters, digits, and the characters \character{_.-} are never quoted.
The optional \var{safe} parameter specifies additional characters
that should not be quoted --- its default value is \code{'/'}.
***************
*** 183,187 ****
Like \function{quote()}, but also replaces spaces by plus signs, as
required for quoting HTML form values. Plus signs in the original
! string are escaped unless they are included in \var{safe}.
\end{funcdesc}
--- 182,187 ----
Like \function{quote()}, but also replaces spaces by plus signs, as
required for quoting HTML form values. Plus signs in the original
! string are escaped unless they are included in \var{safe}. It also
! does not have \var{safe} default to \code{'/'}.
\end{funcdesc}
***************
*** 199,203 ****
\begin{funcdesc}{urlencode}{query\optional{, doseq}}
Convert a mapping object or a sequence of two-element tuples to a
! ``url-encoded'' string, suitable to pass to
\function{urlopen()} above as the optional \var{data} argument. This
is useful to pass a dictionary of form fields to a \code{POST}
--- 199,203 ----
\begin{funcdesc}{urlencode}{query\optional{, doseq}}
Convert a mapping object or a sequence of two-element tuples to a
! ``url-encoded'' string, suitable to pass to
\function{urlopen()} above as the optional \var{data} argument. This
is useful to pass a dictionary of form fields to a \code{POST}
***************
*** 335,342 ****
\begin{methoddesc}[URLopener]{open}{fullurl\optional{, data}}
! Open \var{fullurl} using the appropriate protocol. This method sets
up cache and proxy information, then calls the appropriate open method with
its input arguments. If the scheme is not recognized,
! \method{open_unknown()} is called. The \var{data} argument
has the same meaning as the \var{data} argument of \function{urlopen()}.
\end{methoddesc}
--- 335,342 ----
\begin{methoddesc}[URLopener]{open}{fullurl\optional{, data}}
! Open \var{fullurl} using the appropriate protocol. This method sets
up cache and proxy information, then calls the appropriate open method with
its input arguments. If the scheme is not recognized,
! \method{open_unknown()} is called. The \var{data} argument
has the same meaning as the \var{data} argument of \function{urlopen()}.
\end{methoddesc}