[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版

(yzsuai) #1

of three to be 1,800 new program source lines (plus 1,700 program lines in related
modules reused, and 500 additional lines of help text). By comparison, version 3.0 by
itself grew only by some 30% to be 2,400 new program source lines as described earlier
(plus 2,500 lines in related modules, and 1,700 lines of help text). Statistically minded
readers: consult file linecounts-prior-version.xls in PyMailGUI’s media subdirectory for
a line counts breakdown for version 2.1 by file.


In version 2.1, among PyMailGUI’s new weapons were (and still are) these:



  • MIME multipart mails with attachments may be both viewed and composed.

  • Mail transfers are no longer blocking, and may overlap in time.

  • Mail may be saved and processed offline from a local file.

  • Message parts may now be opened automatically within the GUI.

  • Multiple messages may be selected for processing in list windows.

  • Initial downloads fetch mail headers only; full mails are fetched on request.

  • View window headers and list window columns are configurable.

  • Deletions are performed immediately, not delayed until program exit.

  • Most server transfers report their progress in the GUI.

  • Long lines are intelligently wrapped in viewed and quoted text.

  • Fonts and colors in list and view windows may be configured by the user.

  • Authenticating SMTP mail-send servers that require login are supported.

  • Sent messages are saved in a local file, which may be opened in the GUI.

  • View windows intelligently pick a main text part to be displayed.

  • Already fetched mail headers and full mails are cached for speed.

  • Date strings and addresses in composed mails are formatted properly.

  • View windows now have quick-access buttons for attachments/parts (2.1).

  • Inbox out-of-sync errors are detected on deletes, and on index and mail loads (2.1).

  • Save-mail file loads and deletes are threaded, to avoid pauses for large files (2.1).


The last three items on this list were added in version 2.1; the rest were part of the 2.0
rewrite. Some of these changes were made simple by growth in standard library tools
(e.g., support for attachments is straightforward with the new email package), but most
represented changes in PyMailGUI itself. There were also a few genuine fixes: addresses
were parsed more accurately, and date and time formats in sent mails became standards
conforming, because these tasks used new tools in the email package.


New in Version 3.0 (Fourth Edition)


PyMailGUI version 3.0, presented in this fourth edition of this book, inherits all of 2.1’s
upgrades described in the prior section and adds many of its own. Changes are perhaps
less dramatic in version 3.0, though some address important usability issues, and they


1012 | Chapter 14: The PyMailGUI Client

Free download pdf