[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版
a matches list, and a new PyEdit window positioned at a match after a double-click in the list box. Another pop up appears while ...
PyEdit generates additional pop-up windows—including transient Goto and Find di- alogs, color selection dialogs, dialogs that ap ...
entered encoding name to display properly in PyEdit (and won’t display correctly at all in Notepad). After I enter the encoding ...
Other PyEdit examples and screenshots in this book For other screenshots showing PyEdit in action, see the coverage of the follo ...
Since the current version inherits all the enhancements of the one preceding it, let’s begin with the previous version’s additio ...
may define their own version or configure this file on the module search path per their needs. PyEdit Changes in Version 2.1 (Fo ...
dialogs now send per-dialog-window input fields as arguments to their callbacks. We could instead allow just one of each dialog ...
As coded, a timer loop is run only when a grep is in progress, and each grep uses its own thread, timer loop, and queue. There m ...
In general, programs can avoid Unicode encoding errors by either catching exceptions or opening files in binary mode; since Grep ...
After changing to the file’s directory in order to make any relative filenames in its code accurate, PyEdit now strips off any ...
files in a variety of Unicode encoding format schemes; strings are decoded from these formats when read and encoded to them when ...
The user input dialog on opens and saves is the only GUI implication of these policies; other options are selected in configurat ...
It’s not clear if user prompts should be attempted before configuration settings, or vice-versa. Perhaps we also should always ...
Hence, as shipped: Open uses a passed-in encoding, if any, or else prompts for an encoding name first Save reuses a known encod ...
sys.exit. Since doesn’t allow GUI operations anyhow, this change is un- warranted. Code after mainloop won’t help here either, ...
use on Windows, there is also a one-line .pyw file that just executes the .py file’s contents with an execfile('textEditor.py') ...
---------------------------------------------------------------------------------- initial font # family, size, style font = ('c ...
Example 11-2 serves its purpose, but later in this book update project, I grew tired of using Notepad to view text files from co ...
Example 11-4. PP4E\Gui\TextEditor\textEditor.py """ ############################################################################ ...
import textConfig # startup font and colors configs = textConfig.dict # work if not on the path or bad except: # define in clien ...
«
32
33
34
35
36
37
38
39
40
41
»
Free download pdf