:\pp \internet\ftppython from getfile import getfile getfile(file='sousa au'site='ftp rmi net'dir='user=('lutz''xxx')downloading sousa au download done from pp system media playfile import playfile playfile('sousa au'although python' ftplib already automates the underlying socket and message formatting chores of ftptools of our own like these can make the process even simpler adding user interface if you read the preceding you'll recall that it concluded with quick look at scripts that added user interface to socket-based getfile script--one that transferred files over proprietary socket dialoginstead of over ftp at the end of that presentationi mentioned that ftp is much more generally useful way to move files around because ftp servers are so widely available on the net for illustration purposesexample - shows simple mutation of the prior user interfaceimplemented as new subclass of the preceding general form builderform py of example - example - pp \internet\ftp\getfilegui py ""################################################################################launch ftp getfile function with reusable form gui classuses os chdir to goto target local dir (getfile currently assumes that filename has no local directory path prefix)runs getfile getfile in thread to allow more than one to be running at once and avoid blocking gui during downloadsthis differs from socket-based getfileguibut reuses form gui builder toolsupports both user and anonymous ftp as currently codedcaveatsthe password field is not displayed as stars hereerrors are printed to the console instead of shown in the gui (threads can' generally update the gui on windows)this isn' thread safe (there is slight delay between os chdir here and opening the local output file in getfileand we could display both save-as popup for picking the local dirand remote directory listing for picking the file to getsuggested exercisesimprove me################################################################################""from tkinter import tkmainloop from tkinter messagebox import showinfo import getfileossys_thread from pp internet sockets form import form ftp getfile herenot socket reuse form tool in socket dir class ftpform(form)def __init__(self)root tk(transferring files with ftplib