there (getfile stores in the current working directorywhatever that may be when it is calledhere are the messages printed in the client' consolealong with check on the file transferthe server is still running above testdirbut the client stores the file elsewhere after it' fetched on the socketc:\internet\socketsgetfilegui py local dir= :\users\mark\temp file name =testdir\ora-lp gif server name =localhost port number = client got testdir\ora-lp gif at sun apr : : :\internet\socketsfc / :\users\mark\temp\ora-lp gif testdir\ora-lp gif fcno differences encountered as usualwe can use this interface to connect to servers running locally on the same machine (as done here)or remotely on different computer use different server name and file paths if you're running the server on remote machinethe magic of sockets make this all "just workin either local or remote modes one caveat worth pointing out herethe gui is essentially dead while the download is in progress (even screen redraws aren' handled--try covering and uncovering the window and you'll see what meanwe could make this better by running the download in threadbut since we'll see how to do that in the next when we explore the ftp protocolyou should consider this problem preview in closinga few final notesfirsti should point out that the scripts in this use tkinter techniques we've seen before and won' go into here in the interest of spacebe sure to see the gui in this book for implementation hints keep in mindtoothat these interfaces just add gui on top of the existing script to reuse its codeany command-line tool can be easily gui-ified in this way to make it more appealing and user friendly in for examplewe'll meet more useful client-side tkinter user interface for reading and sending email over sockets (pymailgui)which largely just adds gui to mail-processing tools generally speakingguis can often be added as almost an afterthought to program although the degree of user-interface and core logic separation varies per programkeeping the two distinct makes it easier to focus on each and finallynow that 've shown you how to build user interfaces on top of this getfilei should also say that they aren' really as useful as they might seem in particulargetfile clients can talk only to machines that are running getfile server in the next we'll discover another way to download files--ftp--which also runs on sockets but provides higher-level interface and is available as standard service on many machines on the net we don' generally need to start up custom server to transfer files over ftpthe way we do with getfile in factthe user-interface scripts in this could be easily changed to fetch the desired file with python' network scripting