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

(yzsuai) #1

examples aren't GUI-based, and so aren't listed here. Also see:



  • PyGadgets.py, a simpler script for starting programs in non-demo mode
    that you wish to use on a regular basis

  • PyGadgets_bar.pyw, which creates a button bar for starting all PyGadgets
    programs on demand, not all at once

  • Launcher.py for starting programs without environment settings--finds
    Python, sets PYTHONPATH, etc.

  • Launch_*.pyw for starting PyDemos and PyGadgets with Launcher.py--run these
    for a quick look

  • LaunchBrowser.pyw for running example web pages with an automatically
    located web browser

  • README-PP4E.txt, for general examples information


Caveat: this program tries to start a locally running web server and web
Browser automatically, for web-based demos, but does not kill the server.
################################################################################
"""


...code omitted: see examples package...


################################################################################


start building main GUI windows


################################################################################


from PP4E.Gui.Tools.windows import MainWindow # a Tk with icon, title, quit
from PP4E.Gui.Tools.windows import PopupWindow # same but Toplevel, diff quit
Root = MainWindow('PP4E Demos 2.1')


Figure 10-18. PyDemos with its “code” source code viewer pop-ups


The PyDemos and PyGadgets Launchers | 665
Free download pdf