showhtmlhelp( html version without source file links def onshowmysource(selfshowasmail=false)""display my sourcecode fileplus imported modules here elsewhere ""import pymailguilistwindowsviewwindowssharednamestextconfig from pp internet email mailtools import mailtools now pkg mailsendermailfetchermailparsercan' use in def mymods pymailguilistwindowsviewwindowssharednamespymailguihelppopuputilmessagecachewraplineshtml textmailtoolsmailfetchermailsendermailparsermailconfigtextconfigthreadtoolswindowstexteditorfor mod in mymodssource mod __file__ if source endswith(pyc')source source[:- pyassume py in same dir if showasmailthis is bit cheesey code open(sourceread( platform encoding user mailconfig myaddress hdrmap {'from'appname'to'user'subject'mod __name__viewwindow(showtext=codeheadermap=hdrmaporigmessage=email message message()elsemore useful pyedit text editor eassume in utf unicode encoding (else peedit may ask!wintitle mod __name__ texteditor texteditormainpopup(selfsourcewintitle'utf- 'def onloadserver(selfforcereload=false)""threadedload or reload mail headers list on requestexit,fail,progress run by threadchecker after callback via queueload may overlap with sendsbut disables all but sendcould overlap with loadingmsgsbut may change msg cache listforcereload on delete/synch failelse loads recent arrivals only cache loadheaders may do quick check to see if msgnums in synch with serverif we are loading just newly arrived hdrs""if loadinghdrsbusy or deletingbusy or loadingmsgsbusyshowerror(appname'cannot load headers during load or delete'elseloadinghdrsbusy incr(self cache setpoppassword(appnamedon' update gui in the threadpopup popuputil busyboxnowait(appname'loading message headers'threadtools startthreadaction self cache loadheadersargs (forcereload,)context (popup,)onexit self onloadhdrsexitonfail self onloadhdrsfail the pymailgui client