summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-03-18 16:08:54 (GMT)
committerFred Drake <fdrake@acm.org>1999-03-18 16:08:54 (GMT)
commit596766772eb0b4fd490d012e99634e53019a22d0 (patch)
tree79e52c73072ab4fde6964cc9ed27ed1170008d84 /Doc
parentf3963b1269a9f4fde99724524a7afe81e974aa62 (diff)
downloadcpython-596766772eb0b4fd490d012e99634e53019a22d0.zip
cpython-596766772eb0b4fd490d012e99634e53019a22d0.tar.gz
cpython-596766772eb0b4fd490d012e99634e53019a22d0.tar.bz2
Documented FTP.set_pasv().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libftplib.tex28
1 files changed, 15 insertions, 13 deletions
diff --git a/Doc/lib/libftplib.tex b/Doc/lib/libftplib.tex
index 5840e83..45e65ba 100644
--- a/Doc/lib/libftplib.tex
+++ b/Doc/lib/libftplib.tex
@@ -1,19 +1,17 @@
\section{\module{ftplib} ---
- FTP protocol client.}
-\declaremodule{standard}{ftplib}
+ FTP protocol client}
+\declaremodule{standard}{ftplib}
\modulesynopsis{FTP protocol client (requires sockets).}
-\indexii{FTP}{protocol}
-
This module defines the class \class{FTP} and a few related items.
-The \class{FTP} class implements the client side of the FTP protocol.
-You can use this to write Python programs that perform a variety of
-automated FTP jobs, such as mirroring other ftp servers. It is also
-used by the module \module{urllib} to handle URLs that use FTP. For
-more information on FTP (File Transfer Protocol), see Internet
-\rfc{959}.
+The \class{FTP} class implements the client side of the FTP
+protocol.\indexii{FTP}{protocol} You can use this to write Python
+programs that perform a variety of automated FTP jobs, such as
+mirroring other ftp servers. It is also used by the module
+\refmodule{urllib} to handle URLs that use FTP. For more information
+on FTP (File Transfer Protocol), see Internet \rfc{959}.
Here's a sample session using the \module{ftplib} module:
@@ -71,8 +69,7 @@ not begin with a digit in the range 1--5.
\end{excdesc}
-\subsection{FTP Objects}
-\label{ftp-objects}
+\subsection{FTP Objects \label{ftp-objects}}
\class{FTP} instances have the following methods:
@@ -104,7 +101,7 @@ information that may be relevant to the user.)
Log in as the given \var{user}. The \var{passwd} and \var{acct}
parameters are optional and default to the empty string. If no
\var{user} is specified, it defaults to \code{'anonymous'}. If
-\var{user} is \code{anonymous}, the default \var{passwd} is
+\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
@@ -151,6 +148,11 @@ with the trailing CRLF stripped. The default \var{callback} prints
the line to \code{sys.stdout}.
\end{methoddesc}
+\begin{methoddesc}{set_pasv}{boolean}
+Enable ``passive'' mode if \var{boolean} is true, other disable
+passive mode.
+\end{methoddesc}
+
\begin{methoddesc}{storbinary}{command, file, blocksize}
Store a file in binary transfer mode. \var{command} should be an
appropriate \samp{STOR} command, i.e.\ \code{"STOR \var{filename}"}.