How it works...

This recipe uses ftplib to create an FTP client session with ftp.kernel.org. The test_ftp_connection() function takes the FTP path, username, and email address for connecting to the FTP server.

An FTP client session can be created by calling the FTP() function of ftplib with the preceding connection's credentials. This returns a client handle, which then can be used to run the usual FTP commands, such as the command to change the working directory or cwd(). The dir() method returns the directory listing.

It is a good idea to quit the FTP session by calling ftp.quit().

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.133.233