list elif command[ =' 'if len(command= for in range( len(msglist)+ )showmessage(imsglistelseshowmessage(msgnum(command)msglistsave elif command[ =' 'if len(command= for in range( len(msglist)+ )savemessage(imailfilemsglistelsesavemessage(msgnum(command)mailfilemsglistdelete elif command[ =' 'if len(command= delete all later todelete list(range( len(msglist)+ ) requires list elsedelnum msgnum(commandif ( <delnum <len(msglist)and (delnum not in todelete)todelete append(delnumelseprint('bad message number'mail elif command[ =' 'sendmessage(#execfile('smtpmail py'{}send new mail via smtp altrun file in own namespace elif command[ ='?'print(helptextelseprint('what-type "?for commands help'return todelete if __name__ ='__main__'import getpassmailconfig mailserver mailconfig popservername ex'pop rmi netmailuser mailconfig popusername ex'lutzmailfile mailconfig savemailfile exr' :\stuff\savemailmailpswd getpass getpass('password for % ?mailserverprint('[pymail email client]'msglist loadmessages(mailservermailusermailpswdload all todelete interact(msglistmailfileif todeletedeletemessages(mailservermailusermailpswdtodeleteprint('bye ' console-based email client