Python Developer's Handbook

About the Author

Acknowledgments

Tell Us What You Think!

Introduction

I: Basic Programming

1. Introduction
   Introduction to Python
   Why Use Python?
   Main Technical Features
   Python Distribution
   Installing and Configuring Python
   Python and Other Languages
   Patches and Bugs List
   PSA and the Python Consortium
   Summary

2. Language Review
   Language Review
   The Shell Environment
   Programs
   Built-In Data Types
   Operators
   Expressions
   Control Statements
   Data Structures
   Functions and Procedures
   Modules and Packages
   Input and Output
   File Handling
   Summary
   Code Example

3. Python Libraries
   Python Libraries
   Python Services
   types
   UserDict
   UserList
   operator
   traceback
   linecache
   pickle
   cPickle
   copy_reg
   shelve
   copy
   marshal
   imp
   parser
   symbol
   token
   keyword
   tokenize
   pyclbr
   code
   codeop
   pprint
   repr
   py_compile
   compileall
   dis
   new
   site
   user
   __builtin__
   __main__
   The String Group
   Miscellaneous
   Generic Operational System
   Optional Operational System
   Debugger
   Profiler
   Internet Protocol and Support
   Internet Data Handling
   Restricted Execution
   Multimedia
   Cryptographic
   UNIX Specific
   SGI IRIX Specific
   Sun OS Specific
   MS Windows Specific
   Macintosh Specific
   Undocumented Modules
   Summary

4. Exception Handling
   Exception Handling
   Standard Exceptions (Getting Help from Other Modules)
   Raising Exceptions
   Catching Exceptions
   try/finally
   Creating User-defined Exceptions
   The Standard Exception Hierarchy
   Summary
   Code Examples

5. Object-Oriented Programming
   Object-Oriented Programming
   An Introduction to Python OOP
   Python Classes and Instances
   Methods Handling
   Special Methods
   Inheritance
   Polymorphism
   Encapsulation
   Metaclasses
   Summary
   Code Examples

II: Advanced Programming

6. Extending and Embedding Python
   Extending and Embedding Python
   The Python/C API
   Extending
   Compiling and Linking Extension Modules
   SWIG—The Simple Wrapper Interface Generator
   Other Wrappers
   Embedding
   Summary
   Code Examples

7. Objects Interfacing and Distribution
   Object Interfacing and Distribution
   Interfacing Objects
   Introduction to COM Objects
   Implementing COM Objects in Python
   Distributing Objects with Python
   Summary
   Code Examples

8. Working with Databases
   Working with Databases
   Flat Databases
   DBM (Database Managers) Databases
   Object Serialization and Persistent Storage
   The ODBC Module
   ADO (ActiveX Data Objects)
   Using SQL
   Python DB API
   Summary

9. Other Advanced Topics
   Other Advanced Topics
   Manipulating Images
   Working with Sounds
   Restricted Execution Mode
   Scientific Computing
   Regular Expressions
   Threads
   Summary
   Code Examples

III: Network Programming

10. Basic Network Background
   Networking
   Networking Concepts
   HTTP
   Accessing URLs
   FTP
   SMTP/POP3/IMAP
   Newsgroups—Telnet and Gopher
   Summary

11. Web Development
   Web Development
   Configuring Web Servers for Python/CGI Scripts
   Third-Party Internet Applications
   Other Applications
   Site Management Tools
   Summary

12. Scripting Programming
   Web Programming
   An Introduction to CGI
   The cgi Module
   Creating, Installing, and Running Your Script
   Python Active Scripting
   Summary

13. Data Manipulation
   Parsing and Manipulating Data
   XML Processing
   XML-RPC
   XDR Data Exchange Format
   Handling Other Markup Languages
   MIME Parsing and Manipulation
   Generic Conversion Functions
   Summary

IV: Graphical Interfaces

14. Python and GUIs
   Python GUI Toolkits
   The Tkinter Module
   Overview of Other GUI Modules
   Designing a Good Interface
   Summary

15. Tkinter
   Introduction to Tcl/Tk
   Tkinter
   Geometry Management
   Handling Tkinter Events
   Tkinter Widgets
   Designing Applications
   PMW—Python Mega Widgets
   Tkinter Resources
   Summary

V: Developing with Python
   Chapter

16. Development Environment
   Building Python Applications
   Development Strategy
   Integrated Development Environments
   IDLE
   Pythonwin
   Summary

17. Development Tools
   The Development Process of Python Programs
   Compiling Python
   Editing Code
   Python Scripts
   Generating an Executable Python Bytecode
   Interpreter
   Debugging the Application
   Profiling Python
   Distributing Python Applications
   Summary

VI: Python and Java
   Chapter

18. JPython
   Welcome to JPython
   Java Integration
   Downloading and Installing JPython
   The Interpreter
   The JPython Registry
   Creating Graphical Interfaces
   Embedding
   jpythonc
   Running JPython Applets
   Summary

VII: Appendixes

A. Python/C API
   Python/C API
   The Very High Level Layer
   Reference Counting
   Exception Handling
   Standard Exceptions
   Utilities
   Abstract Objects Layer
   Concrete Objects Layer
   Initialization, Finalization, and Threads
   Memory Management
   Defining New Object Types

B. Running Python on Specific Platforms
   Python on Win32 Systems
   Python on MacOS Systems
   Python on UNIX Systems
   Other Platforms

C. Python Copyright Notices
   Python 2.0 License Information
   Python's Copyright Notice (version 1.6)
   Python's Copyright Notice (until version 1.5.2)
   Copyright Notice of the profile and pstats Modules
   Copyright Notice of JPython with OROMatcher
   Copyright Notice of JPython without OROMatcher

D. Migrating to Python 2.0
   Python 1.6 or Python 2.0. Which One to Choose?
   New Development Process
   Enhancements
   Expected Code Breaking


Last updated on 1/30/2002
Python Developer's Handbook, © 2002 Sams Publishing

© 2002, O'Reilly & Associates, Inc.