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

Fred L. Drake fdrake@users.sourceforge.net
Thu, 12 Apr 2001 13:26:51 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv8396/lib

Modified Files:
	liburllib.tex 
Log Message:

Added warning that FancyURLopener prompts the user on the terminal when
basic authentication is needed.

Added documentation for FancyURLopener.prompt_user_passwd(), explaining
that subclasses should provide more appropriate behavior for the hosting
environment.


Index: liburllib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liburllib.tex,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** liburllib.tex	2001/02/15 17:00:40	1.34
--- liburllib.tex	2001/04/12 20:26:49	1.35
***************
*** 212,215 ****
--- 212,222 ----
  The parameters to the constructor are the same as those for
  \class{URLopener}.
+ 
+ \strong{Note:}  When performing basic authentication, a
+ \class{FancyURLopener} instance calls its
+ \method{prompt_user_passwd()} method.  The default implementation asks
+ the users for the required information on the controlling terminal.  A
+ subclass may override this method to support more appropriate behavior
+ if needed.
  \end{classdesc}
  
***************
*** 315,318 ****
--- 322,339 ----
  before calling the base constructor.
  \end{memberdesc}
+ 
+ The \class{FancyURLopener} class offers one additional method that
+ should be overloaded to provide the appropriate behavior:
+ 
+ \begin{methoddesc}[FancyURLopener]{prompt_user_passwd}{host, realm}
+ Return information needed to authenticate the user at the given host
+ in the specified security realm.  The return value should be a tuple,
+ \code{(\var{user}, \var{password})}, which can be used for basic
+ authentication.
+ 
+ The implementation prompts for this information on the terminal; an
+ application should override this method to use an appropriate
+ interaction model in the local environment.
+ \end{methoddesc}