we will apply such techniques when we explore the pymailgui example in the next to be portablethoughwe can' really close the gui until the active-thread count falls to zerothe exit model of the threading module of can be used to achieve the same effect here is the sort of output that appears in the console window when two downloads overlap in timec:\pp \internet\ftppython getfilegui py server name =ftp rmi net user name=lutz local dir = :\temp file name =spain jpg password=xxxxxxxx remote dir =server name user namelocal dir file name passwordremote dir ======ftp rmi net lutz :\temp index html xxxxxxxx download of "index htmlsuccessful download of "spain jpgsuccessful this example isn' much more useful than command line-based toolof coursebut it can be easily modified by changing its python codeand it provides enough of gui to qualify as simplefirst-cut ftp user interface moreoverbecause this gui runs downloads in python threadsmore than one can be run at the same time from this gui without having to start or restart different ftp client tool while we're in gui moodlet' add simple interface to the putfile utilitytoo the script in example - creates dialog that starts uploads in threadsusing core ftp logic imported from example - it' almost the same as the getfile gui we just wroteso there' not much new to say in factbecause get and put operations are so similar from an interface perspectivemost of the get form' logic was deliberately factored out into single generic class (ftpform)so changes need be made in only single place that isthe put gui here is mostly just reuse of the get guiwith distinct output labels and transfer methods it' in file by itselfthoughto make it easy to launch as standalone program example - pp \internet\ftp\putfilegui py ""##############################################################launch ftp putfile function with reusable form gui classsee getfilegui for notesmost of the same caveats applythe get and put forms have been factored into single class such that changes need be made in only one place##############################################################""transferring files with ftplib