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

(yzsuai) #1

sys.stderr
capturing stream, 127
CGI scripts and, 1161
functionality, 103
output stream buffering, 231
PyMailCGI program and, 1286
sys.stdin
CGI scripts and, 1128
end-of-file character, 115
end-of-line character, 115
functionality, 103
redirecting to Python objects, 123–126
user interaction and, 120–123
sys.stdout
CGI scripts and, 1128
functionality, 103
output stream buffering, 231
redirecting print calls, 128
redirecting to Python objects, 123–126
system programs
additional examples, 341
automated program launchers, 351
comparing directory trees, 308–319
copying directory trees, 304
counting source code lines, 338
generating redirection web pages, 292–297
playing media files, 343–351
printing Unicode filenames, 279–282
recoding copies with classes, 339–341
regression test scripts, 297–304
scanning directories, 272
scanning directory trees, 273
scanning entire machine, 276–279
scanning module search path, 274–276
searching directory trees, 319–329
splitting and joining files, 282–292
walking directories, 330–342
system scripting
additional references, 86
bytes string type, 82
custom paging scripts, 79
file operations and, 83
module documentation sources, 77
overview, 75
paging documentation strings, 78
program usage considerations, 84
Python library manuals, 85
string methods, 80–82
system modules, 76


Unicode encoding, 82
system tools, 177
(see also parallel processing)
defined, 73
os module, 90–101
sys module, 86–90
system scripting, 75–86
systems application domain, 73

T
tables
creating with SQLite, 1334
description considerations, 1339
generating, 1146–1149
laying out forms, 1157–1163
loading from files, 1344–1347
ORM support, 1304
table display script, 1349–1351
table load script, 1347
tags
binding, 548
form, 1149–1152
objects, 553
table, 1148
text, 532
Tcl language, 412, 1547
Telnet service, 874, 901
telnetlib module, 786
tempfile module, 76
templating
server-side languages supporting, 1129,
1297
with replacements and formats, 1408
testparser module, 1441, 1453
text files
buffered output streams and, 832
end-of-line translations, 149–151
Unicode encoding and, 136, 146, 147–149,
538–548
text payload encodings, 929–933, 976
text processing and language analysis
advanced language tools, 1438–1480
custom language parsers, 1440–1457
PyCalc program, 1457
regular expressions, 1415–1429
strategies for, 1405
string method utilities, 1406–1415
XML and HTML parsing, 1429–1438
Text widget class

1580 | Index

Free download pdf