Book description
Programming Python focuses on advanced uses of the Python programming/scripting language, which has evolved from an emerging language of interest primarily to pioneers, to a widely accepted tool that traditional programmers use for real day-to-day development tasks. With Python, you can do almost anything you can do with C++; but Python is an interpreted language designed for rapid application development and deployment. Among other things, Python supports object-oriented programming; a remarkably simple, readable, and maintainable syntax; integration with C components; and a vast collection of pre-coded interfaces and utilities. As Python has grown to embrace developers on a number of different platforms (Unix, Linux, Windows, Mac), companies have taken notice and are adopting Python for their products. It has shown up animating the latest Star Wars movie, serving up maps and directories on the Internet, guiding users through Linux installations, testing chips and boards, managing Internet discussion forums, scripting online games, and even scripting wireless products. Programming Python is the most comprehensive resource for advanced Python programmers available today. Reviewed and endorsed by Python creator Guido van Rossum, who also provides the foreword, this book zeroes in on real-world Python applications. It's been updated for Python 2.0 and covers Internet scripting, systems programming, Tkinter GUIs, C integration domains, and new Python tools and applications. Among them: IDLE, JYthon, Active Scripting and COM extensions, Zope, PSP server pages, restricted execution mode, the HTMLgen and SWIG code generators, thread support, CGI and Internet protocol modules. Such applications are the heart and soul of this second edition. Veteran O'Reilly author Mark Lutz has included a platform-neutral CD-ROM with book examples and various Python-related packages, including the full Python 2.0 source code distribution.
Table of contents
-
Programming Python, 2nd Edition
- Foreword
- Preface
- 1. Introducing Python
-
I. System Interfaces
- 2. System Tools
- 3. Parallel System Tools
- 4. Larger System Examples I
- 5. Larger System Examples II
-
II. GUI Programming
-
6. Graphical User Interfaces
- “Here’s Looking at You, Kid”
- Python GUI Development Options
- Tkinter Overview
- Climbing the GUI Learning Curve
- The End of the Tutorial
- Python/Tkinter for Tcl/Tk Converts
- 7. A Tkinter Tour, Part 1
- 8. A Tkinter Tour, Part 2
-
9. Larger GUI Examples
- “Building a Better Mouse Trap”
- Advanced GUI Coding Techniques
- Complete Program Examples
- PyEdit: A Text Editor Program/Object
- PyView: An Image and Notes Slideshow
- PyDraw: Painting and Moving Graphics
- PyClock: An Analog/Digital Clock Widget
- PyToe: A Tic-Tac-Toe Game Widget
- Where to Go from Here
-
6. Graphical User Interfaces
-
III. Internet Scripting
- 10. Network Scripting
-
11. Client-Side Scripting
- “Socket to Me!”
- Transferring Files over the Net
- Processing Internet Email
- The PyMailGui Email Client
- Other Client-Side Tools
-
12. Server-Side Scripting
- “Oh What a Tangled Web We Weave”
- What’s a Server-Side CGI Script?
- Climbing the CGI Learning Curve
- The Hello World Selector
- Coding for Maintainability
- More on HTML and URL Escapes
- Sending Files to Clients and Servers
- 13. Larger Web Site Examples I
- 14. Larger Web Site Examples II
-
15. Advanced Internet Topics
- “Surfing on the Shoulders of Giants”
- Zope: A Web Publishing Framework
- HTMLgen: Web Pages from Objects
- JPython ( Jython): Python for Java
- Grail: A Python-Based Web Browser
- Python Restricted Execution Mode
- XML Processing Tools
- Windows Web Scripting Extensions
- Python Server Pages
- Rolling Your Own Servers in Python
-
IV. Assorted Topics
-
16. Databases and Persistence
- “Give Me an Order of Persistence, but Hold the Pickles”
- Persistence Options in Python
- DBM Files
- Pickled Objects
- Shelve Files
- SQL Database Interfaces
- PyForm: A Persistent Object Viewer
- 17. Data Structures
- 18. Text and Language
-
16. Databases and Persistence
-
V. Integration
-
19. Extending Python
- “I Am Lost at C”
- C Extensions Overview
- A Simple C Extension Module
- The SWIG Integration Code Generator
- Wrapping C Environment Calls
- A C Extension Module String Stack
- A C Extension Type String Stack
- Wrapping C++ Classes with SWIG
- 20. Embedding Python
-
19. Extending Python
-
VI. The End
-
21. Conclusion: Python and the Development Cycle
- “That’s the End of the Book, Now Here’s the Meaning of Life”
- “Something’s Wrong with the Way We Program Computers”
- The “Gilligan Factor”
- Doing the Right Thing
- Enter Python
- But What About That Bottleneck?
- On Sinking the Titanic
- So What’s Python: The Sequel
- In the Final Analysis...
- Postscript to the Second Edition
-
A. Recent Python Changes
- Major Changes in 2.0
- Major Changes in 1.6
-
Major Changes Between 1.3 and 1.5.2
-
Core Language Changes
- Pseudo-private class attributes
- Class exceptions
- Package imports
- New assert statement
- Reserved word changes
- New dictionary methods
- New list methods
- “Raw” string constants
- Complex number type
- Printing cyclic objects doesn’t core dump
- raise without arguments: re-raise
- raise forms for class exceptions
- Power operator X ** Y
- Generalized sequence assignments
- It’s faster
-
Library Changes
- dir(X) now works on more objects
- New conversions: int(X), float(X), list(S)
- The new re regular expression module
- splitfields/joinfields became split/join
- Persistence: unpickler no longer calls __init__
- Object pickler coded in C: cPickle
- anydbm.open now expects a “c” second argument for prior behavior
- rand module replaced by random module
- Assorted Tkinter changes
- CGI module interface change
- site.py, user.py, and PYTHONHOME
- Assignment to os.environ[key] calls putenv
- New sys.exc_info( ) tuple
- The new operator module
-
Tool Changes
- JPython (a.k.a. Jython): a Python-to-Java compiler
- MS-Windows ports: COM, Tkinter
- SWIG growth, C++ shadow classes
- Zope (formerly Bobo): Python objects for the Web
- HTMLgen: making HTML from Python classes
- PMW: Python mega-widgets for Tkinter
- IDLE: an integrated development environment GUI
- Other tool growth: PIL, NumPy, Database API
- Python/C Integration API Changes
-
Core Language Changes
- B. Pragmatics
- C. Python Versus C++
-
21. Conclusion: Python and the Development Cycle
- Index
- Colophon
Product information
- Title: Programming Python, Second Edition
- Author(s):
- Release date: March 2001
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596000851
You might also like
book
Programming Python, 4th Edition
If you've mastered Python's fundamentals, you're ready to start using it to get real work done. …
book
Programming Python, 3rd Edition
Already the industry standard for Python users, ProgrammingPython fromO'Reilly just got even better. This third edition …
book
Expert Python Programming - Third Edition
Refine your Python programming skills and build professional-grade applications with this comprehensive guide Key Features Create …
video
Python Programming Language
6+ Hours of Video Instruction Python Programming Language LiveLessons provides developers with a guided tour of …