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

(yzsuai) #1

PyView image program
frame-based menus, 512
functionality, 727
running, 727–732
source code, 732–738
widget support, 528
PYW extension, 371
PyWin32 package
development options, 779
overview, 362
PyXML SIG, 1435


Q
queries
automating, 1341–1342
CGI script support, 57–59
parameter considerations, 1138, 1176
running with SQLite, 1336–1338
QUERY_STRING environment variable, 1201
queue module
arguments versus globals, 206
functionality, 76, 204
program exit with child threads, 206
running the script, 207
threads and, 188
Queue object (multiprocessing), 248, 252–254
queues
placing callbacks on, 640–646
placing data on, 636–640
Quit button, 429
quit method, 369
quopri module, 786


R
Radiobutton widget class
associated variables, 457
command option, 462
functionality, 411, 462–467
variables and, 463–465
random access files, 153–155
random module, 51, 488
range function, 7
re module
compile function, 1417, 1421, 1422
escape function, 1422
findall function, 1418, 1419, 1421, 1431
finditer function, 1421
functionality, 1416


match function, 1417, 1419, 1421, 1422
search function, 1418, 1419, 1421, 1422
sub function, 1422
subn function, 1422
records
adding with SQLite, 1334
building dictionaries, 1339–1342
built-in dictionaries, 9–14
formatted files, 14–19
list-based, 4–8
per-record pickle files, 22–23
pickle files, 19–22
shelves and, 23–25
recursive descent parsing, 1439, 1440
refactoring code
alternative classes, 32
augmenting methods, 31
with CGI scripts, 1192–1201
with classes, 888–892
constructor customization, 32
display format, 31
with functions, 884–888
Register_Handler function, 1531
regression test scripts, 297–304
regular expressions
defined, 1416
limitations, 1438
parsing support, 1431
pattern examples, 1425–1427
pattern matching techniques, 1416–1418
pattern syntax, 1423–1425
re module, 1416, 1421–1425
scanning C header files, 1427–1429
string operations versus, 1418–1421
remote sites
deleting remote trees, 895–898
downloading directories, 874–880
downloading remote trees, 899
remote servers, 798, 1145
uploading directories, 880–884
repeater method, 586
ReplaceVisitor class, 336
reporting directory differences, 317–319
reserved port numbers, 801–802
RETR string (FTP), 860
RFC822, 899
rfc822 module, 924
RIAs (rich Internet applications), 361, 778,
1297

Index| 1575
Free download pdf