You can use the ftplib module in Python. It allows you to write programs that perform a variety of automated FTP jobs. You can easily connect to a FTP server to retrieve files and process them locally.
example
import ftplib ftp = ftplib.FTP('ftp.yourserver.com', 'yourusername', '[email protected]') print "File List: " files = ftp.dir() print(files) ftp.cwd("/tmp") #change working directory to /tmp
Above code connects to a FTP server and prints the file list in the home directory of that server.