etc -- see PP4E\Gui\TextEditor\textConfig.py
font = ('courier', 9, 'normal')
height = 20 # Tk default: 24 lines
width = 80 # Tk default: 80 characters
PyMailGUIHelp: User Help Text and Display
Finally, Example 14-11 lists the module that defines the text displayed in PyMailGUI’s
help pop up as one triple-quoted string, as well as a function for displaying the HTML
rendition of this text. The HTML version of help itself is in a separate file not listed in
full here but included in the book’s examples package.
In fact, I’ve omitted most of the help text string, too, to conserve space here (it spanned
11 pages in the prior edition, and would be longer in this one!). For the full story, see
this module in the examples package, or run PyMailGUI live and click the help bar at
the top of its main server list window to learn more about how PyMailGUI’s interface
operates. If fact, you probably should; the help display may explain some properties of
PyMailGUI not introduced by the demo and other material earlier in this chapter.
The HTML rendition of help includes section links, and is popped up in a web browser.
Because the text version also is able to pop up source files and minimizes external
dependencies (HTML fails if no browser can be located), both the text and HTML
versions are provided and selected by users in the mailconfig module. Other schemes
are possible (e.g., converting HTML to text by parsing as a fallback option), but they
are left as suggested improvements.
Example 14-11. PP4E\Internet\PyMailGui\PyMailGuiHelp.py (partial)
"""
##########################################################################
PyMailGUI help text string and HTML display function;
History: this display began as an info box pop up which had to be
narrow for Linux; it later grew to use scrolledtext with buttons
instead; it now also displays an HTML rendition in a web browser;
2.1/3E: the help string is stored in this separate module to avoid
distracting from executable code. As coded, we throw up this text
in a simple scrollable text box; in the future, we might instead
use an HTML file opened with a browser (use webbrowser module, or
run a "browser help.html" or DOS "start help.html" with os.system);
3.0/4E: the help text is now also popped up in a web browser in HTML
form, with lists, section links, and separators; see the HTML file
PyMailGuiHelp.html in the examples package for the simple HTML
translation of the help text string here, popped up in a browser;
both the scrolled text widget and HTML browser forms are currently
supported: change mailconfig.py to use the flavor(s) you prefer;
##########################################################################
"""
PyMailGUI Implementation| 1111