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

(yzsuai) #1

This script is the file my desktop shortcut invokes, because I prefer to run gadget GUIs
on demand. On many platforms, you can drag this out as a shortcut on your desktop
for easy access this way. You can also run a script like this at your system’s startup to
make it always available (and to save a mouse click). For instance, on Windows, such
a script might be automatically started by adding it to your Startup folder, and on Unix
and its kin you can automatically start such a script by spawning it with a command
line in your system startup scripts after X Windows has been started.


Whether run via a shortcut, a file explorer click, a typed command line, or other means,
the PyGadgets launcher bar near the center of Figure 10-20 appears.


Figure 10-20. PyGadgets launcher bar with gadgets


Of course, the whole point of PyGadgets is to spawn other programs. Pressing on its
launcher bar’s buttons starts programs like those shown in the rest of Figure 10-20, but
if you want to know more about those, you’ll have to turn the page and move on to the
next chapter.


670 | Chapter 10: GUI Coding Techniques

Free download pdf