[Python-checkins] CVS: python/dist/src/Doc/lib liburllib.tex,1.20.4.3,1.20.4.4

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Wed, 15 Mar 2000 12:04:17 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Doc/lib
In directory weyr:/home/fdrake/projects/python/Doc-152p2/lib

Modified Files:
      Tag: release152p1-patches
	liburllib.tex 
Log Message:

Fixed a markup bug; symptoms noticed by Peter Funk
<pf@artcom-gmbh.de>.  The classdesc for FancyURLopener didn't include
*anything* for constructor parameters.

Also moved URLopener method descriptions to a separate subsection to
be more like other places in the manual.


Index: liburllib.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/lib/liburllib.tex,v
retrieving revision 1.20.4.3
retrieving revision 1.20.4.4
diff -C2 -r1.20.4.3 -r1.20.4.4
*** liburllib.tex	2000/02/18 23:17:53	1.20.4.3
--- liburllib.tex	2000/03/15 17:04:14	1.20.4.4
***************
*** 195,234 ****
  \var{key_file} and \var{cert_file} are supported; both are needed to
  actually retrieve a resource at an \file{https:} URL.
- 
- \begin{methoddesc}{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}
- 
- \begin{methoddesc}{open_unknown}{fullurl\optional{, data}}
- Overridable interface to open unknown URL types.
- \end{methoddesc}
- 
- \begin{methoddesc}{retrieve}{url\optional{, filename\optional{, reporthook}}}
- Retrieves the contents of \var{url} and places it in \var{filename}.  The
- return value is a tuple consisting of a local filename and either a
- \class{mimetools.Message} object containing the response headers (for remote
- URLs) or None (for local URLs).  The caller must then open and read the
- contents of \var{filename}.  If \var{filename} is not given and the URL
- refers to a local file, the input filename is returned.  If the URL is
- non-local and \var{filename} is not given, the filename is the output of
- \function{tempfile.mktemp()} with a suffix that matches the suffix of the last
- path component of the input URL.  If \var{reporthook} is given, it must be
- a function accepting three numeric parameters.  It will be called after each
- chunk of data is read from the network.  \var{reporthook} is ignored for
- local URLs.
- \end{methoddesc}
- 
  \end{classdesc}
  
! \begin{classdesc}{FancyURLopener}
! \class{FancyURLopener} subclasses \class{URLopener} providing default handling 
! for the following HTTP response codes: 301, 302 or 401.  For 301 and 302
! response codes, the \code{location} header is used to fetch the actual URL.
! For 401 response codes (authentication required), basic HTTP authentication
! is performed.
  \end{classdesc}
  
--- 195,209 ----
  \var{key_file} and \var{cert_file} are supported; both are needed to
  actually retrieve a resource at an \file{https:} URL.
  \end{classdesc}
+ 
+ \begin{classdesc}{FancyURLopener}{...}
+ \class{FancyURLopener} subclasses \class{URLopener} providing default
+ handling for the following HTTP response codes: 301, 302 or 401.  For
+ 301 and 302 response codes, the \code{location} header is used to
+ fetch the actual URL.  For 401 response codes (authentication
+ required), basic HTTP authentication is performed.
  
! The parameters to the constructor are the same as those for
! \class{URLopener}.
  \end{classdesc}
  
***************
*** 281,284 ****
--- 256,293 ----
  
  \end{itemize}
+ 
+ 
+ \subsection{URLopener Objects \label{urlopener-objs}}
+ \sectionauthor{Skip Montanaro}{skip@mojam.com}
+ 
+ \class{URLopener} and \class{FancyURLopener} objects have the
+ following methodsL
+ 
+ \begin{methoddesc}{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}
+ 
+ \begin{methoddesc}{open_unknown}{fullurl\optional{, data}}
+ Overridable interface to open unknown URL types.
+ \end{methoddesc}
+ 
+ \begin{methoddesc}{retrieve}{url\optional{, filename\optional{, reporthook}}}
+ Retrieves the contents of \var{url} and places it in \var{filename}.  The
+ return value is a tuple consisting of a local filename and either a
+ \class{mimetools.Message} object containing the response headers (for remote
+ URLs) or None (for local URLs).  The caller must then open and read the
+ contents of \var{filename}.  If \var{filename} is not given and the URL
+ refers to a local file, the input filename is returned.  If the URL is
+ non-local and \var{filename} is not given, the filename is the output of
+ \function{tempfile.mktemp()} with a suffix that matches the suffix of the last
+ path component of the input URL.  If \var{reporthook} is given, it must be
+ a function accepting three numeric parameters.  It will be called after each
+ chunk of data is read from the network.  \var{reporthook} is ignored for
+ local URLs.
+ \end{methoddesc}