pause after each def showmessage(imsglist)if < <len(msglist)#print(msglist[ - ]oldprints entire mail--hdrs+text print('- msg parser(parsestr(msglist[ - ]expects str in content msg get_payload(prints payloadstringor [messagesif isinstance(contentstr)keep just one end-line at end content content rstrip('\nprint(contentprint('- to get text onlysee email parsers elseprint('bad message number'def savemessage(imailfilemsglist)if < <len(msglist)savefile open(mailfile' 'encoding=mailconfig fetchencoding savefile write('\nmsglist[ - '-'* '\ 'elseprint('bad message number'def msgnum(command)tryreturn int(command split()[ ]exceptreturn - assume this is bad helptext ""available commandsi index display nlist all messages (or just message nd nmark all messages for deletion (or just message ns nsave all messages to file (or just message nm compose and send new mail message quit pymail display this help text ""def interact(msglistmailfile)showindex(msglisttodelete [while truetrycommand input('[pymailaction(ildsmq?'except eoferrorcommand 'qif not commandcommand '*quit if command =' 'break index elif command[ =' ' client-side scripting