save files, though the user can limit their sizes with periodic deletions; users might
also benefit from a prompt for deletions if they grow too large.
Embedded links
Hyperlink URLs within messages could be highlighted visually and made to spawn
a web browser automatically when clicked by using the launcher tools we met in
the GUI and system parts of this book (tkinter’s text widget supports links directly).
Help text redundancy
In this version, the help text had grown so large that it is also implemented as
HTML and displayed in a web browser using Python’s webbrowser module (instead
of or in addition to text, per mailconfig settings). That means there are currently
two copies of the basic help text: simple text and HTML. This is less than ideal
from a maintenance perspective going forward.
We may want to either drop the simple text version altogether, or attempt to extract
the simple text from the HTML with Python’s html.parser module to avoid re-
dundant copies; see Chapter 19 for more on HTML parsing in general, and see
PyMailGUI’s new html2text module for a plain-text extraction tool prototype. The
HTML help version also does not include links to display source files; these could
be inserted into the HTML automatically with string formatting, though it’s not
clear what all browsers will do with Python source code (some may try to run it).
More threading contexts
Message Save and Split file writes could also be threaded for worst-case scenarios.
For pointers on making Saves parallel, see the comments in the file class of List
Windows.py; there may be some subtle issues that require both thread locks and
general file locking for potentially concurrent updates. List window index fills
might also be threaded for pathologically large mailboxes and woefully slow ma-
chines (optimizing to avoid reparsing headers may help here, too).
Attachment list deletes
There is currently no way to delete an attachment once it has been added in com-
pose windows. This might be supported by adding quick-access part buttons to
compose windows, too, which could verify and delete the part when clicked.
Spam filtering
We could add an automatic spam filter for mails fetched, in addition to any pro-
vided at the email server or ISP. The Python-based SpamBayes might help. This is
often better implemented by servers than clients, but not all ISPs filter spam.
Improve multiple account usage
Per the prior section, the current system selects one of multiple email accounts and
uses its corresponding mail configuration module by running special code in the
altconfigs subdirectory. This works for a book example, but it would be fairly
straightforward to improve for broader audiences.
Ideas for Improvement| 1117