print('connecting 'connection ftp(sitenameconnection login(*userinfoconnection cwd(dirnameif nonpassiveconnection set_pasv(falseconnect to ftp site default is anonymous login xfer at time to localfile force active ftp if server requires print('downloading 'localfile open(filename'wb'local file to store download connection retrbinary('retr filenamelocalfile write connection quit(localfile close(print('playing 'webbrowser open(filename appendix dsolutions to end-of-part exercises