""#################################################################################mailtools packageinterface to mail server transfersused by pymail pymailguiand pymailcgidoes loadssendsparsingcomposingand deletingwith part attachmentsencodings (of both the email and unicdode kind)etc the parserfetcherand sender classes here are designed to be mixed-in to subclasses which use their methodsor used as embedded or standalone objectsthis package also includes convenience subclasses for silent modeand moreloads all mail text if pop server doesn' do topdoesn' handle threads or ui hereand allows askpassword to differ per subclassprogress callback funcs get statusall calls raise exceptions on error--client must handle in gui/otherthis changed from file to packagenested modules imported here for bw compat eneed to use package-relative import syntax throughoutbecause in py package dir in no longer on module import search path if package is imported elsewhere (from another directory which uses this package)also performs unicode decoding on mail text when fetched (see mailfetcher)as well as for some text part payloads which might have been email-encoded (see mailparser)tbdin savepartsshould file be opened in text mode for textcontypestbdin walknamedpartsshould we skip oddballs like message/delivery-statustbdunicode support has not been tested exhaustivelysee for more on the py email package and its limitationsand the policies used here#################################################################################""collect contents of all modules herewhen package dir imported directly from mailfetcher import from mailsender import epackage-relative from mailparser import export nested modules herewhen from mailtools import __all__ 'mailfetcher''mailsender''mailparserself-test code is in selftest py to allow mailconfig' path to be set before running thr nested module imports above mailtool class example - contains common superclasses for the other classes in the package this is in part meant for future expansion at presentthese are used only to enable or disable trace message output (some clientssuch as web-based programsmay not want text to be printed to the output streamsubclasses mix in the silent variant to turn off output client-side scripting