Skip to content

Commit 036e41d

Browse files
committed
Closes #19181: replace non-existing host ftp.cwi.nl with ftp.debian.org in ftplib example.
1 parent 0bbbeb5 commit 036e41d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Doc/library/ftplib.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ as mirroring other ftp servers. It is also used by the module
2323
Here's a sample session using the :mod:`ftplib` module::
2424

2525
>>> from ftplib import FTP
26-
>>> ftp = FTP('ftp.cwi.nl') # connect to host, default port
27-
>>> ftp.login() # user anonymous, passwd anonymous@
28-
>>> ftp.retrlines('LIST') # list directory contents
29-
total 24418
30-
drwxrwsr-x 5 ftp-usr pdmaint 1536 Mar 20 09:48 .
31-
dr-xr-srwt 105 ftp-usr pdmaint 1536 Mar 21 14:32 ..
32-
-rw-r--r-- 1 ftp-usr pdmaint 5305 Mar 20 09:48 INDEX
33-
.
34-
.
35-
.
26+
>>> ftp = FTP('ftp.debian.org') # connect to host, default port
27+
>>> ftp.login() # user anonymous, passwd anonymous@
28+
'230 Login successful.'
29+
>>> ftp.cwd('debian') # change into "debian" directory
30+
>>> ftp.retrlines('LIST') # list directory contents
31+
-rw-rw-r-- 1 1176 1176 1063 Jun 15 10:18 README
32+
...
33+
drwxr-sr-x 5 1176 1176 4096 Dec 19 2000 pool
34+
drwxr-sr-x 4 1176 1176 4096 Nov 17 2008 project
35+
drwxr-xr-x 3 1176 1176 4096 Oct 10 2012 tools
36+
'226 Directory send OK.'
3637
>>> ftp.retrbinary('RETR README', open('README', 'wb').write)
3738
'226 Transfer complete.'
3839
>>> ftp.quit()
@@ -423,7 +424,8 @@ FTP_TLS Objects
423424

424425
.. method:: FTP_TLS.auth()
425426

426-
Set up secure control connection by using TLS or SSL, depending on what specified in :meth:`ssl_version` attribute.
427+
Set up secure control connection by using TLS or SSL, depending on what
428+
specified in :meth:`ssl_version` attribute.
427429

428430
.. method:: FTP_TLS.ccc()
429431

@@ -440,5 +442,3 @@ FTP_TLS Objects
440442
.. method:: FTP_TLS.prot_c()
441443

442444
Set up clear text data connection.
443-
444-

0 commit comments

Comments
 (0)