load and delete calls to the server or local file list windows are created on program startup (the initial server windowand possible save-file windows for command-line options)as well as in response to open button actions in existing list windows (for opening new save-file list windowssee the open button' callback in this example for initiation code notice that the basic mail processing operations in the mailtools package from are mixed into pymailgui in variety of ways the list window classes in example - inherit from the mailtools mail parser classbut the server list window class embeds an instance of the message cache objectwhich in turn inherits from the mailtools mail fetcher the mailtools mail sender class is inherited by message view write windowsnot list windowsview windows also inherit from the mail parser this is fairly large filein principle it could be split into three filesone for each classbut these classes are so closely related that it is handy to have their code in single file for edits reallythis is one classwith two minor extensions example - pp \internet\email\pymailgui\listwindows py ""##############################################################################implementation of mail-server and save-file message list main windowsone class per kind code is factored here for reuseserver and file list windows are customized versions of the pymailcommon list window classthe server window maps actions to mail transferred from serverand the file window applies actions to local file list windows create viewwritereplyand forward windows on user actions the server list window is the main window opened on program startup by the top-level filefile list windows are opened on demand via server and file list window "openmsgnums may be temporarily out of sync with server if pop inbox changes (triggers full reload herechanges here in -now checks on deletes and loads to see if msg nums in sync with server -added up to attachment direct-access buttons on view windows -threaded save-mail file loadsto avoid -second pause for big files -also threads save-mail file deletes so file write doesn' pause gui tbd-save-mail file saves still not threadedmay pause gui brieflybut uncommon unlike load and deletesave/send only appends the local file -implementation of local save-mail files as text files with separators is mostly prototypeit loads all full mails into memoryand so limits the practical size of these filesbetter alternativeuse dbm keyed access files for hdrs and fulltextplus list to map keys to positionin this scheme save-mail files become directoriesno longer readable ##############################################################################""from sharednames import program-wide global objects the pymailgui client