June 2015
Intermediate to advanced
320 pages
7h 18m
English
Unlike SFTP, FTP uses the plain-text file transfer method. This means any username or password transferred through the wire can be detected by an unrelated third-party. Even though FTP is a very popular file transfer protocol, people frequently use this for transferring a file from their PCs to the remote servers.
In Python, ftplib is a built-in module used for transferring the files to and from the remote machines. You can create an anonymous FTP client connection with the FTP() class.
ftp_client = ftplib.FTP(path, username, email)
Then you can invoke the normal FTP commands, such as CWD. In order to download a binary file, you need to create a file-handler such as the following:
file_handler = open(DOWNLOAD_FILE_NAME, ...
Read now
Unlock full access