""def actions(self)return ('open'self onopenmailfile)('write'self onwritemail)('none) separators ('view'self onviewformatmail)('reply'self onreplymail)('fwd'self onfwdmail)('save'self onsavemailfile)('delete'self ondeletemail)('none)('quit'self quitdef __init__(selffilename)callerdo loadmailfilethread next pymailcommon __init__(selfself filename filename self openfilebusy threadtools threadcounter(one per window def loadmailfilethread(self)""load or reload file and update window index listcalled on openstartupand possibly on send if sent-mail file appended is currently openthere is always bogus first item after the text splitalt[self parseheaders(mfor in self msglist]could pop up busy dialogbut quick for small files this is now threaded--else runs sec for meg filesbut can pause gui seconds if very large filesave now uses addsavedmails to append msg lists for speednot this reloadstill called from send just because msg text unavailable requires refactoringdelete threaded tooprevent open and delete overlap""if self openfilebusydon' allow parallel open/delete changes errmsg 'cannot loadfile is busy:\ "% "self filename showerror(appnameerrmsgelse#self listbox insert(end'loading 'error if user clicks savetitle self title(set by window class self title(appname 'loading 'self openfilebusy incr(threadtools startthreadaction self loadmailfileargs ()context (savetitle,)onexit self onloadmailfileexitonfail self onloadmailfilefaildef loadmailfile(self)run in thread while gui is active openreadparser may all raise excscaught in thread utility the pymailgui client