Python in a Nutshell |
By Alex Martelli |
| |
Publisher | : O'Reilly |
Pub Date | : March 2003 |
ISBN | : 0-596-00188-6 |
Pages | : 654 |
| Copyright |
| | Preface |
| | | How This Book Is Organized |
| | | Conventions Used in This Book |
| | | How to Contact Us |
| | | Acknowledgments |
|
| | Part I: Getting Started with Python |
| | | Chapter 1. Introduction to Python |
| | | Section 1.1. The Python Language |
| | | Section 1.2. The Python Standard Library and Extension Modules |
| | | Section 1.3. Python Implementations |
| | | Section 1.4. Python Development and Versions |
| | | Section 1.5. Python Resources |
|
| | | Chapter 2. Installation |
| | | Section 2.1. Installing Python from Source Code |
| | | Section 2.2. Installing Python from Binaries |
| | | Section 2.3. Installing Jython |
|
| | | Chapter 3. The Python Interpreter |
| | | Section 3.1. The python Program |
| | | Section 3.2. Python Development Environments |
| | | Section 3.3. Running Python Programs |
| | | Section 3.4. The Jython Interpreter |
|
|
| | Part II: Core Python Language and Built-ins |
| | | Chapter 4. The Python Language |
| | | Section 4.1. Lexical Structure |
| | | Section 4.2. Data Types |
| | | Section 4.3. Variables and Other References |
| | | Section 4.4. Expressions and Operators |
| | | Section 4.5. Numeric Operations |
| | | Section 4.6. Sequence Operations |
| | | Section 4.7. Dictionary Operations |
| | | Section 4.8. The print Statement |
| | | Section 4.9. Control Flow Statements |
| | | Section 4.10. Functions |
|
| | | Chapter 5. Object-Oriented Python |
| | | Section 5.1. Classic Classes and Instances |
| | | Section 5.2. New-Style Classes and Instances |
| | | Section 5.3. Special Methods |
| | | Section 5.4. Metaclasses |
|
| | | Chapter 6. Exceptions |
| | | Section 6.1. The try Statement |
| | | Section 6.2. Exception Propagation |
| | | Section 6.3. The raise Statement |
| | | Section 6.4. Exception Objects |
| | | Section 6.5. Custom Exception Classes |
| | | Section 6.6. Error-Checking Strategies |
|
| | | Chapter 7. Modules |
| | | Section 7.1. Module Objects |
| | | Section 7.2. Module Loading |
| | | Section 7.3. Packages |
| | | Section 7.4. The Distribution Utilities (distutils) |
|
| | | Chapter 8. Core Built-ins |
| | | Section 8.1. Built-in Types |
| | | Section 8.2. Built-in Functions |
| | | Section 8.3. The sys Module |
| | | Section 8.4. The getopt Module |
| | | Section 8.5. The copy Module |
| | | Section 8.6. The bisect Module |
| | | Section 8.7. The UserList, UserDict, and UserString Modules |
|
| | | Chapter 9. Strings and Regular Expressions |
| | | Section 9.1. Methods of String Objects |
| | | Section 9.2. The string Module |
| | | Section 9.3. String Formatting |
| | | Section 9.4. The pprint Module |
| | | Section 9.5. The repr Module |
| | | Section 9.6. Unicode |
| | | Section 9.7. Regular Expressions and the re Module |
|
|
| | Part III: Python Library and Extension Modules |
| | | Chapter 10. File and Text Operations |
| | | Section 10.1. The os Module |
| | | Section 10.2. Filesystem Operations |
| | | Section 10.3. File Objects |
| | | Section 10.4. Auxiliary Modules for File I/O |
| | | Section 10.5. The StringIO and cStringIO Modules |
| | | Section 10.6. Compressed Files |
| | | Section 10.7. Text Input and Output |
| | | Section 10.8. Richer-Text I/O |
| | | Section 10.9. Interactive Command Sessions |
| | | Section 10.10. Internationalization |
|
| | | Chapter 11. Persistence and Databases |
| | | Section 11.1. Serialization |
| | | Section 11.2. DBM Modules |
| | | Section 11.3. The Berkeley DB Module |
| | | Section 11.4. The Python Database API (DBAPI) 2.0 |
|
| | | Chapter 12. Time Operations |
| | | Section 12.1. The time Module |
| | | Section 12.2. The sched Module |
| | | Section 12.3. The calendar Module |
| | | Section 12.4. The mx.DateTime Module |
|
| | | Chapter 13. Controlling Execution |
| | | Section 13.1. Dynamic Execution and the exec Statement |
| | | Section 13.2. Restricted Execution |
| | | Section 13.3. Internal Types |
| | | Section 13.4. Garbage Collection |
| | | Section 13.5. Termination Functions |
| | | Section 13.6. Site and User Customization |
|
| | | Chapter 14. Threads and Processes |
| | | Section 14.1. Threads in Python |
| | | Section 14.2. The thread Module |
| | | Section 14.3. The Queue Module |
| | | Section 14.4. The threading Module |
| | | Section 14.5. Threaded Program Architecture |
| | | Section 14.6. Process Environment |
| | | Section 14.7. Running Other Programs |
| | | Section 14.8. The mmap Module |
|
| | | Chapter 15. Numeric Processing |
| | | Section 15.1. The math and cmath Modules |
| | | Section 15.2. The operator Module |
| | | Section 15.3. The random Module |
| | | Section 15.4. The array Module |
| | | Section 15.5. The Numeric Package |
| | | Section 15.6. Array Objects |
| | | Section 15.7. Universal Functions (ufuncs) |
| | | Section 15.8. Optional Numeric Modules |
|
| | | Chapter 16. Tkinter GUIs |
| | | Section 16.1. Tkinter Fundamentals |
| | | Section 16.2. Widget Fundamentals |
| | | Section 16.3. Commonly Used Simple Widgets |
| | | Section 16.4. Container Widgets |
| | | Section 16.5. Menus |
| | | Section 16.6. The Text Widget |
| | | Section 16.7. The Canvas Widget |
| | | Section 16.8. Geometry Management |
| | | Section 16.9. Tkinter Events |
|
| | | Chapter 17. Testing, Debugging, and Optimizing |
| | | Section 17.1. Testing |
| | | Section 17.2. Debugging |
| | | Section 17.3. The warnings Module |
| | | Section 17.4. Optimization |
|
|
| | Part IV: Network and Web Programming |
| | | Chapter 18. Client-Side Network Protocol Modules |
| | | Section 18.1. URL Access |
| | | Section 18.2. Email Protocols |
| | | Section 18.3. The HTTP and FTP Protocols |
| | | Section 18.4. Network News |
| | | Section 18.5. Telnet |
| | | Section 18.6. Distributed Computing |
|
| | | Chapter 19. Sockets and Server-Side Network Protocol Modules |
| | | Section 19.1. The socket Module |
| | | Section 19.2. The SocketServer Module |
| | | Section 19.3. Event-Driven Socket Programs |
|
| | | Chapter 20. CGI Scripting and Alternatives |
| | | Section 20.1. CGI in Python |
| | | Section 20.2. Cookies |
| | | Section 20.3. Other Server-Side Approaches |
|
| | | Chapter 21. MIME and Network Encodings |
| | | Section 21.1. Encoding Binary Data as Text |
| | | Section 21.2. MIME and Email Format Handling |
|
| | | Chapter 22. Structured Text: HTML |
| | | Section 22.1. The sgmllib Module |
| | | Section 22.2. The htmllib Module |
| | | Section 22.3. The HTMLParser Module |
| | | Section 22.4. Generating HTML |
|
| | | Chapter 23. Structured Text: XML |
| | | Section 23.1. An Overview of XML Parsing |
| | | Section 23.2. Parsing XML with SAX |
| | | Section 23.3. Parsing XML with DOM |
| | | Section 23.4. Changing and Generating XML |
|
|
| | Part V: Extending and Embedding |
| | | Chapter 24. Extending and Embedding Classic Python |
| | | Section 24.1. Extending Python with Python's C API |
| | | Section 24.2. Extending Python Without Python's C API |
| | | Section 24.3. Embedding Python |
|
| | | Chapter 25. Extending and Embedding Jython |
| | | Section 25.1. Importing Java Packages in Jython |
| | | Section 25.2. Embedding Jython in Java |
| | | Section 25.3. Compiling Python into Java |
|
| | | Chapter 26. Distributing Extensions and Programs |
| | | Section 26.1. Python's distutils |
| | | Section 26.2. The py2exe Tool |
| | | Section 26.3. The Installer Tool |
|
|
| | Colophon |
| | Index |