Book description
This book offers Python programmers one place to look when they needhelp remembering or deciphering the syntax of this open source languageand its many powerful but scantily documented modules. Thiscomprehensive reference guide makes it easy to look up the mostfrequently needed information--not just about the Python languageitself, but also the most frequently used parts of the standard libraryand the most important third-party extensions.
Ask any Python aficionado and you'll hear that Python programmers haveit all: an elegant object-oriented language with readable andmaintainable syntax, that allows for easy integration with componentsin C, C++, Java, or C#, and an enormous collection of precoded standardlibrary and third-party extension modules. Moreover, Python is easy tolearn, yet powerful enough to take on the most ambitious programmingchallenges. But what Python programmers used to lack is a concise andclear reference resource, with the appropriate measure of guidance inhow best to use Python's great power. Python in aNutshell fills this need.
Python in a Nutshell, Second Edition covers morethan the language itself; it also deals with the mostfrequently used parts of the standard library, and the most popular andimportant third party extensions. Revised and expanded forPython 2.5, this book now contains the gory details of Python's newsubprocess module and breaking news about Microsoft's newIronPython project. Our "Nutshell" format fits Python perfectly bypresenting the highlights of the most important modules and functionsin its standard library, which cover over 90% of your practicalprogramming needs. This book includes:
- A fast-paced tutorial on the syntax of the Python language
- An explanation of object-oriented programming in Python
- Coverage of iterators, generators, exceptions, modules,packages, strings, and regular expressions
- A quick reference for Python's built-in types and functionsand key modules
- Reference material on important third-party extensions,such as Numeric and Tkinter
- Information about extending and embedding Python
Python in a Nutshell provides a solid,no-nonsense quick reference to information that programmers rely on themost. This book will immediately earn its place in any Pythonprogrammer's library.
Praise for the First Edition:
"In a nutshell, Python in a Nutshell serves oneprimary goal: to act as an immediately accessible goal for the Pythonlanguage. True, you can get most of the same core information that ispresented within the covers of this volume online, but this willinvariably be broken into multiple files, and in all likelihood lackingthe examples or the exact syntax description necessary to trulyunderstand a command."
--Richard Cobbett, Linux Format
"O'Reilly has several good books, of which Python in aNutshell by Alex Martelli is probably the best for giving yousome idea of what Python is about and how to do useful things with it."
--Jerry Pournelle, Byte Magazine
Publisher resources
Table of contents
- Python in a Nutshell
- Preface
-
I. Getting Started with Python
- 1. Introduction to Python
- 2. Installation
- 3. The Python Interpreter
-
II. Core Python Language and Built-ins
-
4. The Python Language
- Lexical Structure
- Data Types
- Variables and Other References
- Expressions and Operators
- Numeric Operations
- Sequence Operations
- Set Operations
- Dictionary Operations
- The print Statement
- Control Flow Statements
- Functions
-
5. Object-Oriented Python
- Classes and Instances
- Special Methods
- Decorators
- Metaclasses
- 6. Exceptions
- 7. Modules
- 8. Core Built-ins
- 9. Strings and Regular Expressions
-
4. The Python Language
-
III. Python Library and Extension Modules
- 10. File and Text Operations
- 11. Persistence and Databases
- 12. Time Operations
- 13. Controlling Execution
- 14. Threads and Processes
- 15. Numeric Processing
- 16. Array Processing
- 17. Tkinter GUIs
- 18. Testing, Debugging, and Optimizing
-
IV. Network and Web Programming
- 19. Client-Side Network Protocol Modules
- 20. Sockets and Server-Side Network Protocol Modules
- 21. CGI Scripting and Alternatives
- 22. MIME and Network Encodings
- 23. Structured Text: HTML
- 24. Structured Text: XML
-
V. Extending and Embedding
-
25. Extending and Embedding Classic Python
-
Extending Python with Python’s C API
- Building and Installing C-Coded Python Extensions
- Overview of C-Coded Python Extension Modules
- Return Values of Python’s C API Functions
- Module Initialization
- Reference Counting
- Accessing Arguments
- Creating Python Values
- Exceptions
- Abstract Layer Functions
- Concrete Layer Functions
- A Simple Extension Example
- Defining New Types
- Extending Python Without Python’s C API
- Embedding Python
- Pyrex
-
Extending Python with Python’s C API
- 26. Extending and Embedding Jython
- 27. Distributing Extensions and Programs
-
25. Extending and Embedding Classic Python
- A. About the Author
- Index
- About the Author
- Colophon
- Copyright
Product information
- Title: Python in a Nutshell, 2nd Edition
- Author(s):
- Release date: July 2006
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596100469
You might also like
book
Python in a Nutshell, 3rd Edition
Useful in many roles, from design and prototyping to testing, deployment, and maintenance, Python is consistently …
book
Python in a Nutshell, 4th Edition
Python was recently ranked as today's most popular programming language on the TIOBE index, thanks to …
book
Python in a Nutshell
Ask any Python aficionado and you'll hear that Python programmers have it all: an elegant language …
video
Python Programming Language
6+ Hours of Video Instruction Python Programming Language LiveLessons provides developers with a guided tour of …