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

(yzsuai) #1

PyEdit really does assume control of the program’s window (including its title and
window manager close button), and packing the note editor at the bottom means it
might not appear for tall images. Run this on your own to sample the other PyEdit
flavors, with a command line of this form:


C:\...\PP4E\Gui\SlideShow> slideShowPlus.py ../gifs 0

The note file viewer appears only if you press the Note button, and it is erased if you
press it again—PyView uses the widget pack and pack_forget methods introduced near
the end of Chapter 9 to show and hide the note viewer frame. The window automati-
cally expands to accommodate the note viewer when it is packed and displayed. Note
that it’s important that the note editor be repacked with expand=YES and fill=BOTH when
it’s unhidden, or else it won’t expand in some modes; PyEdit’s frame packs itself this
way in GuiMaker when first made, but pack_forget appears to, well...forget.


It is also possible to open the note file in a PyEdit pop-up window, but PyView embeds
the editor by default to retain a direct visual association and avoid issues if the pop up


Figure 11-15. PyView other PyEdit notes


PyView: An Image and Notes Slideshow | 731
Free download pdf