To close out this chapter, let’s explore the implementations of the two GUIs used to run major book examples. The following GUIs, PyDemos and PyGadgets, are simply GUIs for launching other GUI programs. In fact, we’ve now come to the end of the demo launcher story—both of the new programs here interact with modules that we met earlier in Part II:
Starts independent Python programs portably.
Finds programs, and ultimately runs both PyDemos and PyGadgets when used by the self-configuring top-level launcher scripts.
Spawns web browsers portably to open local or remote pages.
See Part II (especially the ends of Chapter 5 and Chapter 6) for links to the code for these modules. The programs introduced here add the GUI components to the program-launching system—they simply provide easy-to-use pushbuttons that spawn most of the larger examples in this text when pressed.
Both of these scripts also assume that they will be run with the
current working directory set to their directory (they hardcode paths
to other programs relative to that). Either click on their names in a
file explorer or run them from a command-line shell after a
cd to the top-level
PP4E examples root directory. These scripts could
allow invocations from other directories by prepending an environment
variable’s value to program script paths, but they were really
designed to be run only out of the PP4E
Because these demo launchers are long programs, ...