Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(21458)

Delta Between Two Patch Sets: Lib/ftplib.py

Issue 19689: ssl.create_default_context()
Left Patch Set: Created 5 years, 6 months ago
Right Patch Set: Created 5 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/asyncio/selector_events.py ('k') | Lib/http/client.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 """An FTP client class and some helper functions. 1 """An FTP client class and some helper functions.
2 2
3 Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds 3 Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds
4 4
5 Example: 5 Example:
6 6
7 >>> from ftplib import FTP 7 >>> from ftplib import FTP
8 >>> ftp = FTP('ftp.python.org') # connect to host, default port 8 >>> ftp = FTP('ftp.python.org') # connect to host, default port
9 >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@ 9 >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@
10 '230 Guest login ok, access restrictions apply.' 10 '230 Guest login ok, access restrictions apply.'
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 elif file == '-p': 1076 elif file == '-p':
1077 ftp.set_pasv(not ftp.passiveserver) 1077 ftp.set_pasv(not ftp.passiveserver)
1078 else: 1078 else:
1079 ftp.retrbinary('RETR ' + file, \ 1079 ftp.retrbinary('RETR ' + file, \
1080 sys.stdout.write, 1024) 1080 sys.stdout.write, 1024)
1081 ftp.quit() 1081 ftp.quit()
1082 1082
1083 1083
1084 if __name__ == '__main__': 1084 if __name__ == '__main__':
1085 test() 1085 test()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+