[Python-checkins] CVS: python/dist/src/Doc/lib libftplib.tex,1.34,1.35
Guido van Rossum
gvanrossum@users.sourceforge.net
Fri, 28 Dec 2001 12:54:30 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv16049
Modified Files:
libftplib.tex
Log Message:
SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password. This avoids
privacy violations.
Index: libftplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** libftplib.tex 2001/12/26 19:48:43 1.34
--- libftplib.tex 2001/12/28 20:54:28 1.35
***************
*** 21,25 ****
>>> from ftplib import FTP
>>> ftp = FTP('ftp.cwi.nl') # connect to host, default port
! >>> ftp.login() # user anonymous, passwd user@hostname
>>> ftp.retrlines('LIST') # list directory contents
total 24418
--- 21,25 ----
>>> from ftplib import FTP
>>> ftp = FTP('ftp.cwi.nl') # connect to host, default port
! >>> ftp.login() # user anonymous, passwd anonymous@
>>> ftp.retrlines('LIST') # list directory contents
total 24418
***************
*** 122,129 ****
\var{user} is specified, it defaults to \code{'anonymous'}. If
\var{user} is \code{'anonymous'}, the default \var{passwd} is
! \samp{\var{realuser}@\var{host}} where \var{realuser} is the real user
! name (glanced from the \envvar{LOGNAME} or \envvar{USER} environment
! variable) and \var{host} is the hostname as returned by
! \function{socket.gethostname()}. This function should be called only
once for each instance, after a connection has been established; it
should not be called at all if a host and user were given when the
--- 122,126 ----
\var{user} is specified, it defaults to \code{'anonymous'}. If
\var{user} is \code{'anonymous'}, the default \var{passwd} is
! \code{'anonymous@'}. This function should be called only
once for each instance, after a connection has been established; it
should not be called at all if a host and user were given when the