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

(yzsuai) #1

binding, 394, 443–448, 563–564
Canvas widget support, 560–564
mouse-related, 445–448
routing, 1531
triggering, 1531
exception handlers, file closure and, 139–141
exec function
C API equivalent, 1516
converting strings, 1161
parsing support, 1438
PyCalc support, 1460, 1461
exit status
forking processes and, 219
shell command codes, 216–219
threads and, 220–222
Expat parser, 1430
extend list operator, 6
extending integration mode
additional tools, 1511–1514
defined, 1484
overview, 1486
simple C module, 1487
simple C++ class, 1503–1505
SWIG tool, 1491–1495


F
f2py system, 1514
FastCGI extension, 1182
FFI (foreign function interface), 1512
field labels (lists), 7–8
FieldStorage class, 1152, 1166, 1187, 1255
fifos (see named pipes)
file descriptors
defined, 224
wrapping in file objects, 158, 226
file download system, 840–851
file objects
alternate open options, 144
built-in, 137–145
close method, 137, 139
defined, 135
ensuring closure, 139–141
file object model, 136
input files, 141–142
output files, 137–139
read method, 141
readline method, 141, 143
readlines method, 141, 143, 1410
seek method, 153


wrapping descriptors in, 158, 226
write method, 137
writelines method, 138
file scanners, 160–163
file tools
binary files, 136, 146–155
built-in file objects, 137–145
file object model, 136
file scanners, 160–163
os module support, 155
overview, 135
text files, 136, 146–155
File Transfer Protocol (see FTP)
files, 14
(see also formatted files)
closing, 139–142
code files, 1516
current working directory and, 104
editing in directory trees, 334–336
joining, 286–289–292
loading database tables, 1344–1347
name conventions, 15, 1143
opening, 138, 144
persistence options, 1304
private, 1215–1217
redirecting streams to, 114–119
sockets looking like, 827–839
splitting, 283–286, 289–292
summing columns in, 1410–1412
system scripting and, 83
transferring over the Internet, 854, 857–
860
transferring to clients/servers, 1209–1227
transferring with ftplib, 854–873
Unicode text in, 543
writing, 138
FileVisitor class, 331–334
filters
file scanning and, 162
spam, 1117
find module, 321–324
find shell command, 320
flash method, 586
Flex framework, 361
FLI format, 595
flushes
deadlocks and, 232
output stream buffering and, 231–233
fnmatch module, 166, 323–324

Index| 1563
Free download pdf