How to use FTP in Python
Sending a small file in an email as an attachment can work in many situations, but for large files this can be a painful process. FTP has made it easier for individuals and businesses to transfer files between different locations. File Transport Protocol , or FTP, is an open protocol standard that is widely used to transport and receive large files. FTP uses Transmission Control Protocol (TCP) to transfer files from one location to another.
Python ftplib module defines the class FTP and a few related items. The 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 downloading files from Server. The following Python program create an FTP client and downloading a file from Server.