Andre Lessa9780672319945, 0672319942
Table of contents :
Python Developer’s Handbook – Sams Dec 2000……Page 0
Python Developer’s Handbook……Page 1
About the Author……Page 12
Acknowledgments……Page 13
Tell Us What You Think!……Page 15
Introduction……Page 2
Table of Contents……Page 5
Part I: Basic Programming……Page 16
1. Introduction……Page 17
Introduction to Python……Page 18
Why Use Python?……Page 22
Main Technical Features……Page 26
Python Distribution……Page 30
Installing and Configuring Python……Page 33
Python and Other Languages……Page 40
Patches and Bugs List……Page 44
PSA and the Python Consortium……Page 46
Summary……Page 50
2. Language Review……Page 52
Language Review……Page 53
The Shell Environment……Page 54
Programs……Page 60
Built-In Data Types……Page 70
Operators……Page 82
Expressions……Page 87
Control Statements……Page 103
Data Structures……Page 107
Functions and Procedures……Page 119
Modules and Packages……Page 129
Input and Output……Page 137
File Handling……Page 145
Summary……Page 151
Code Example……Page 153
3. Python Libraries……Page 160
Python Libraries……Page 161
Python Services……Page 164
types……Page 169
UserDict……Page 170
UserList……Page 171
operator……Page 172
traceback……Page 174
linecache……Page 175
pickle……Page 176
cPickle……Page 177
copy_reg……Page 178
shelve……Page 179
copy……Page 180
marshal……Page 182
imp……Page 183
parser……Page 185
symbol……Page 186
token……Page 187
keyword……Page 188
tokenize……Page 189
pyclbr……Page 190
code……Page 191
codeop……Page 192
pprint……Page 193
repr……Page 194
py_compile……Page 195
compileall……Page 196
dis……Page 198
new……Page 199
site……Page 200
user……Page 201
__builtin__……Page 202
__main__……Page 203
The String Group……Page 204
Miscellaneous……Page 212
Generic Operational System……Page 217
Optional Operational System……Page 228
Debugger……Page 233
Profiler……Page 234
Internet Protocol and Support……Page 235
Internet Data Handling……Page 239
Restricted Execution……Page 244
Multimedia……Page 245
Cryptographic……Page 247
UNIX Specific……Page 249
SGI IRIX Specific……Page 255
Sun OS Specific……Page 257
MS Windows Specific……Page 258
Macintosh Specific……Page 259
Undocumented Modules……Page 260
Summary……Page 267
4. Exception Handling……Page 270
Exception Handling……Page 271
Standard Exceptions (Getting Help from Other Modules)……Page 277
Raising Exceptions……Page 281
Catching Exceptions……Page 290
try/finally……Page 294
Creating User-defined Exceptions……Page 296
The Standard Exception Hierarchy……Page 299
Summary……Page 306
Code Examples……Page 307
5. Object-Oriented Programming……Page 311
Object-Oriented Programming……Page 312
An Introduction to Python OOP……Page 314
Python Classes and Instances……Page 319
Methods Handling……Page 329
Special Methods……Page 333
Inheritance……Page 341
Polymorphism……Page 346
Encapsulation……Page 350
Metaclasses……Page 354
Summary……Page 358
Code Examples……Page 360
Part II: Advanced Programming……Page 367
6. Extending and Embedding Python……Page 368
Extending and Embedding Python……Page 369
The Python/C API……Page 372
Extending……Page 375
Compiling and Linking Extension Modules……Page 395
SWIG—The Simple Wrapper Interface Generator……Page 405
Other Wrappers……Page 410
Embedding……Page 412
Summary……Page 420
Code Examples……Page 423
7. Objects Interfacing and Distribution……Page 428
Object Interfacing and Distribution……Page 429
Interfacing Objects……Page 431
Introduction to COM Objects……Page 432
Implementing COM Objects in Python……Page 441
Distributing Objects with Python……Page 466
Summary……Page 478
Code Examples……Page 481
8. Working with Databases……Page 489
Working with Databases……Page 490
Flat Databases……Page 492
DBM (Database Managers) Databases……Page 496
Object Serialization and Persistent Storage……Page 507
The ODBC Module……Page 515
ADO (ActiveX Data Objects)……Page 521
Using SQL……Page 524
Python DB API……Page 535
Summary……Page 550
9. Other Advanced Topics……Page 553
Other Advanced Topics……Page 554
Manipulating Images……Page 555
Working with Sounds……Page 561
Restricted Execution Mode……Page 570
Scientific Computing……Page 574
Regular Expressions……Page 582
Threads……Page 591
Summary……Page 598
Code Examples……Page 600
Part III: Network Programming……Page 604
10. Basic Network Background……Page 605
Networking……Page 606
Networking Concepts……Page 607
HTTP……Page 625
Accessing URLs……Page 638
FTP……Page 643
SMTP/POP3/IMAP……Page 647
Newsgroups—Telnet and Gopher……Page 651
Summary……Page 655
11. Web Development……Page 658
Web Development……Page 659
Configuring Web Servers for Python/CGI Scripts……Page 661
Third-Party Internet Applications……Page 669
Other Applications……Page 677
Site Management Tools……Page 682
Summary……Page 690
12. Scripting Programming……Page 693
Web Programming……Page 694
An Introduction to CGI……Page 696
The cgi Module……Page 699
Creating, Installing, and Running Your Script……Page 704
Python Active Scripting……Page 732
Summary……Page 741
13. Data Manipulation……Page 743
Parsing and Manipulating Data……Page 744
XML Processing……Page 745
XML-RPC……Page 766
XDR Data Exchange Format……Page 769
Handling Other Markup Languages……Page 777
MIME Parsing and Manipulation……Page 796
Generic Conversion Functions……Page 815
Summary……Page 824
Part IV: Graphical Interfaces……Page 828
14. Python and GUIs……Page 829
Python GUI Toolkits……Page 830
The Tkinter Module……Page 833
Overview of Other GUI Modules……Page 835
Designing a Good Interface……Page 850
Summary……Page 852
15. Tkinter……Page 854
Introduction to Tcl/Tk……Page 855
Tkinter……Page 857
Geometry Management……Page 864
Handling Tkinter Events……Page 872
Tkinter Widgets……Page 881
Designing Applications……Page 922
PMW—Python Mega Widgets……Page 930
Tkinter Resources……Page 932
Summary……Page 934
Part V: Developing with Python……Page 937
Part V……Page 936
16. Development Environment……Page 938
Building Python Applications……Page 939
Development Strategy……Page 940
Integrated Development Environments……Page 954
IDLE……Page 955
Pythonwin……Page 976
Summary……Page 991
17. Development Tools……Page 992
The Development Process of Python Programs……Page 993
Compiling Python……Page 994
Editing Code……Page 1001
Python Scripts……Page 1006
Generating an Executable Python Bytecode……Page 1012
Interpreter……Page 1015
Debugging the Application……Page 1021
Profiling Python……Page 1031
Distributing Python Applications……Page 1047
Summary……Page 1052
Part VI: Python and Java……Page 1055
Chapter 18……Page 1054
18. JPython……Page 1056
Welcome to JPython……Page 1057
Java Integration……Page 1062
Downloading and Installing JPython……Page 1065
The Interpreter……Page 1071
The JPython Registry……Page 1074
Creating Graphical Interfaces……Page 1078
Embedding……Page 1081
jpythonc……Page 1084
Running JPython Applets……Page 1088
Summary……Page 1091
Part VII: Appendixes……Page 1092
Appendix A. Python/C API……Page 1093
Python/C API……Page 1094
The Very High Level Layer……Page 1107
Reference Counting……Page 1111
Exception Handling……Page 1114
Standard Exceptions……Page 1120
Utilities……Page 1122
Abstract Objects Layer……Page 1128
Concrete Objects Layer……Page 1143
Initialization, Finalization, and Threads……Page 1173
Memory Management……Page 1188
Defining New Object Types……Page 1193
Appendix B. Running Python on Specific Platforms……Page 1198
Python on Win32 Systems……Page 1199
Python on MacOS Systems……Page 1204
Python on UNIX Systems……Page 1209
Other Platforms……Page 1212
Appendix C. Python Copyright Notices……Page 1215
Python 2.0 License Information……Page 1216
Python’s Copyright Notice (version 1.6)……Page 1218
Copyright Notice (until version 1.5.2)……Page 1221
Copyright notice of the profile and pstate Modules……Page 1223
Copyright Notice of JPython with OROMatcher……Page 1225
Copyright Notice of JPython without OROMatcher……Page 1228
Appendix D. Migrating to Python 2.0……Page 1231
Python 1.6 or Python 2.0. Which One to Choose?……Page 1232
New Development Process……Page 1233
Enhancements……Page 1235
Expected Code Breaking……Page 1239
Front Matter……Page 1241
Index – Symbols……Page 1244
Index – B……Page 1267
Index – C……Page 1274
Index – D……Page 1292
Index – E……Page 1302
Index – F……Page 1312
Index – G……Page 1326
Index – H……Page 1332
Index – I……Page 1337
Index – J……Page 1348
Index – K……Page 1350
Index – L……Page 1352
Index – M……Page 1359
Index – N……Page 1385
Index – O……Page 1390
Index – P……Page 1400
Index – Q……Page 1421
Index – R……Page 1422
Index – S……Page 1430
Index – T……Page 1454
Index – U……Page 1462
Index – V……Page 1468
Index – W……Page 1472
Index – X……Page 1479
Index – Y……Page 1481
Reviews
There are no reviews yet.