command line, and automatically opens them when the GUI starts up. This is used by
the PyDemos launcher of Chapter 10, for example.
Example 14-1. PP4E\Internet\Email\PyMailGui\PyMailGui.py
"""
##################################################################################
PyMailGui 3.0 - A Python/tkinter email client.
A client-side tkinter-based GUI interface for sending and receiving email.
See the help string in PyMailGuiHelp.py for usage details, and a list of
enhancements in this version.
Version 2.0 was a major, complete rewrite. The changes from 2.0 (July '05)
to 2.1 (Jan '06) were quick-access part buttons on View windows, threaded
loads and deletes of local save-mail files, and checks for and recovery from
message numbers out-of-synch with mail server inbox on deletes, index loads,
and message loads.
Version 3.0 (4E) is a port to Python 3.X; uses grids instead of packed column
frames for better form layout of headers in view windows; runs update() after
inserting into a new text editor for accurate line positioning (see PyEdit
loadFirst changes in Chapter 11); provides an HTML-based version of its help
text; extracts plain-text from HTML main/only parts for display and quoting;
supports separators in toolbars; addresses both message content and header
Unicode/I18N encodings for fetched, sent, and saved mails (see Ch13 and Ch14);
and much more (see Ch14 for the full rundown on 3.0 upgrades); fetched message
decoding happens deep in the mailtools package, on mail cache load operations
here; mailtools also fixes a few email package bugs (see Ch13);
This file implements the top-level windows and interface. PyMailGui uses a
number of modules that know nothing about this GUI, but perform related tasks,
some of which are developed in other sections of the book. The mailconfig
module is expanded for this program.
==Modules defined elsewhere and reused here:==
mailtools (package)
client-side scripting chapter
server sends and receives, parsing, construction (Example 13-21+)
threadtools.py
GUI tools chapter
thread queue manangement for GUI callbacks (Example 10-20)
windows.py
GUI tools chapter
border configuration for top-level windows (Example 10-16)
textEditor.py
GUI programs chapter
text widget used in mail view windows, some pop ups (Example 11-4)
==Generally useful modules defined here:==
popuputil.py
help and busy windows, for general use
messagecache.py
1064 | Chapter 14: The PyMailGUI Client