pprint module
displaying databases, 13
regular expression parsing and, 1431
SAX parsing and, 1432
scanning directory trees, 273
print function
CGI scripts and, 1163
functionality, 78
redirecting, 127
standard streams and, 113
printing
dialog results, 434–436
Unicode filenames, 279–282
Process class (multiprocessing), 245
process forking (see forking processes)
program execution
automated program launchers, 351
CGI scripts, 1143
cross-program communication, 480
GUI programs, 371, 478–484
launching email programs, 910
launching methods, 258–263
persistence options, 1303
PyCalc program, 1463
pymail console client, 952–956, 989–991
PyMailGUI, 1010
server-side scripts, 1130–1134
threads and, 187
program exits
with child threads, 206
os module, 215
process exit status and shared state, 219
shell commands and, 216–219
sys module, 214
thread exits and shared state, 220–222
programming Python
adding behavior, 29
adding GUI, 40–51
adding inheritance, 29
adding persistence, 34–36
adding web-based interfaces, 52–69
alternative database options, 36
class considerations, 27–29
coding for reusability, 482–484
console interaction, 37–39
Hello World program, 368, 376
inputting user data, 44
Internet development options, 777–780
OOP considerations, 26–36
programming pointers, 5
rapid development features, 1548–1552
refactoring code, 31–34
representing records, 4–14
socket programming, 787–802
storing records persistently, 14–25
programs, 112
(see also spawned programs)
chaining with pipes, 116
independent, 238, 254
redirecting streams to, 114–119
protocols
client/server considerations, 783
defined, 782
development options, 777
pickle module and, 1314
port number rules, 783
standards overview, 786
structural considerations, 784
PSF (Python Software Foundation), 36
PSP (Python Server Pages), 780, 1169, 1182
pty module, 233
putfile module, 866
PY extension, 372
py2exe tool, 359
PyArg_Parse API function, 1522, 1524
Py_BuildValue API function, 1525
PyCalc program
adding buttons, 1477–1480
building GUI, 1459
CalcGui class, 1464, 1465
as component, 1475–1477
Evaluator class, 1466
extending and attaching, 1461
functionality, 1457–1459, 1463
running, 1463
running code strings, 1460
source code, 1469–1475
PyClock program
functionality, 747
plotting points on a circle, 747–751
running, 751–754
source code, 754–761
widget support, 528
Py_CompileString API function, 1528
PyCrypto system, 1278, 1280
PyDemos launcher toolbar, 662–664, 673,
1061
1572 | Index