in and expanded in but it simply loads all attributes from the version we wrote in to avoid redundancyand customizes as desiredthe local version is listed in example - example - pp \internet\email\pymailcgi\cgi-bin\mailconfig py ""user configuration settings for various email programs (pymailcgi version)email scripts get their server names and other email config options from this modulechange me to reflect your machine namessigand preferences""from pp internet email mailconfig import reuse ch configs fetchlimit emaximum number headers/emails to fetch on loads (dflt= pop mail interface our next utility modulethe loadmail file in example - depends on external files and encapsulates access to mail on the remote pop server machine it currently exports one functionloadmailhdrswhich returns list of the header text (onlyof all mail in the specified pop accountcallers are unaware of whether this mail is fetched over the netlives in memoryor is loaded from persistent storage medium on the cgi server machine that is by design--because loadmail changes won' impact its clientsit is mostly hook for future expansion example - pp \internet\web\pymailcgi\cgi-bin\loadmail py ""mail list loaderfuture--change me to save mail list between cgi script runsto avoid reloading all mail each timethis won' impact clients that use the interfaces here if done wellfor nowto keep this simplereloads all mail for each list page +we now only load message headers (via top)not full msgbut still fetch all hdrs for each index list--in-memory caches don' work in stateless cgi scriptand require real (likely server-sidedatabase""from commonhtml import runsilent from externs import mailtools suppress prints (no verbose flagshared with pymailgui load all mail from number up this may trigger an exception import sys def progress(*args)not used sys stderr write(str(args'\ 'def loadmailhdrs(mailservermailusermailpswd)fetcher mailtools silentmailfetcher(mailservermailusermailpswdhdrssizesfull fetcher downloadallheaders(get list of hdr text return hdrs utility modules