Publisher: O'Reilly Media Released: March 2001 Pages: 1296
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. |
-
Chapter 1 Introducing Python -
“And Now for Something Completely Different” -
The Life of Python -
The Compulsory Features List -
What’s Python Good For? -
What’s Python Not Good For? -
System Interfaces -
Chapter 2 System Tools - “The os.path to Knowledge”
- Why Python Here?
- System Scripting Overview
- The sys Module
- The os Module
- Script Execution Context
- Current Working Directory
- Command-Line Arguments
- Shell Environment Variables
- Standard Streams
- File Tools
- Directory Tools
-
Chapter 3 Parallel System Tools - “Telling the Monkeys What to Do”
- Forking Processes
- Threads
- Program Exits
- Interprocess Communication
- Pipes
- Signals
- Launching Programs on Windows
- Other System Tools
-
Chapter 4 Larger System Examples I - “Splits and Joins and Alien Invasions”
- Splitting and Joining Files
- Generating Forward-Link Web Pages
- A Regression Test Script
- Packing and Unpacking Files
- User-Friendly Program Launchers
-
Chapter 5 Larger System Examples II - “The Greps of Wrath”
- Fixing DOS Line Ends
- Fixing DOS Filenames
- Searching Directory Trees
- Visitor: Walking Trees Generically
- Copying Directory Trees
- Deleting Directory Trees
- Comparing Directory Trees
-
GUI Programming -
Chapter 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
-
Chapter 7 A Tkinter Tour, Part 1 - “Widgets and Gadgets and GUIs, Oh My!”
- Configuring Widget Appearance
- Toplevel Windows
- Dialogs
- Binding Events
- Message and Entry
- Checkbutton, Radiobutton, and Scale
- Running GUI Code Three Ways
- Images
-
Chapter 8 A Tkinter Tour, Part 2 - “On Today’s Menu: Spam, Spam, and Spam”
- Menus
- Listboxes and Scrollbars
- Text
- Canvas
- Grids
- Time Tools, Threads, and Animation
- The End of the Tour
- The PyDemos and PyGadgets Launchers
-
Chapter 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
-
Internet Scripting -
Chapter 10 Network Scripting - “Tune in, Log on, and Drop out”
- Plumbing the Internet
- Socket Programming
- Handling Multiple Clients
- A Simple Python File Server
-
Chapter 11 Client-Side Scripting - “Socket to Me!”
- Transferring Files over the Net
- Processing Internet Email
- The PyMailGui Email Client
- Other Client-Side Tools
-
Chapter 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
-
Chapter 13 Larger Web Site Examples I - “Things to Do When Visiting Chicago”
- The PyMailCgi Web Site
- The Root Page
- Sending Mail by SMTP
- Reading POP Email
- Utility Modules
- CGI Script Trade-offs
-
Chapter 14 Larger Web Site Examples II - “Typos Happen”
- The PyErrata Web Site
- The Root Page
- Browsing PyErrata Reports
- Submitting PyErrata Reports
- PyErrata Database Interfaces
- Administrative Tools
- Designing for Reuse and Growth
-
Chapter 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
-
Assorted Topics -
Chapter 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
-
Chapter 17 Data Structures - “Roses Are Red, Violets Are Blue; Lists Are Mutable, and So Is Class Foo”
- Implementing Stacks
- Implementing Sets
- Binary Search Trees
- Graph Searching
- Reversing Sequences
- Permuting Sequences
- Sorting Sequences
- Data Structures Versus Python Built-ins
- PyTree: A Generic Tree Object Viewer
-
Chapter 18 Text and Language - “See Jack Hack. Hack, Jack, Hack”
- Strategies for Parsing Text in Python
- String Module Utilities
- Regular Expression Matching
- Parser Generators
- Hand-Coded Parsers
- PyCalc: A Calculator Program/Object
-
Integration -
Chapter 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
-
Chapter 20 Embedding Python - “Add Python. Mix Well. Repeat.”
- C Embedding API Overview
- Basic Embedding Techniques
- Registering Callback Handler Objects
- Using Python Classes in C
- ppembed: A High-Level Embedding API
- Other Integration Topics
-
The End -
Chapter 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
-
Appendix Recent Python Changes - Major Changes in 2.0
- Major Changes in 1.6
- Major Changes Between 1.3 and 1.5.2
-
Appendix Pragmatics - Installing Python
- Book Examples Distribution
- Environment Configuration
- Running Python Programs
- Python Internet Resources
-
Appendix Python Versus C++ -
Colophon |
- Title:
- Programming Python, 2nd Edition
- By:
- Mark Lutz
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Safari Books Online
- Print:
- March 2001
- Pages:
- 1296
- Print ISBN:
- 978-0-596-00085-1
- | ISBN 10:
- 0-596-00085-5
|
-
Mark Lutz Mark Lutz is an independent Python trainer, writer, and software developer, and is one of the primary figures in the Python community. He is the author of the O'Reilly books Programming Python and Python Pocket Reference (both in 2nd Editions), and co-author of Learning Python (both in 2nd Editions). Mark has been involved with Python since 1992, began teaching Python classes in 1997, and has instructed over 90 Python training sessions as of early 2003. In addition, he holds BS and MS degrees in computer science from the University of Wisconsin, and over the last two decades has worked on compilers, programming tools, scripting applications, and assorted client/server systems. Whenever Mark gets a break from spreading the Python word, he leads an ordinary, average life with his kids in Colorado. Mark can be reached by email at , or on the web at http://www.rmi.net/~lutz. View Mark Lutz's full profile page. |
Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Programming Python is an African rock python, one of approximately 18 species of python. Pythons are non-venomous constrictor snakes that live in tropical regions of Africa, Asia, Australia and some Pacific Islands. Pythons live mainly on the ground, but they are also excellent swimmers and climbers. Both male and female pythons retain vestiges of their ancestral hind legs. The male python uses these vestiges, or spurs, when courting a female. The python kills its prey by suffocation. While the snake's sharp teeth grip and hold the prey in place, the python's long body coils around its victim's chest, constricting tighter each time it breathes out. They feed primarily on mammals and birds. Unix and its attendant programs can be unruly beasts. Nutshell Handbooks help you tame them. Edie Freedman designed this cover and the entire Unix bestiary that appears on Nutshell Handbooks, using a 19th-century engraving from the Dover Pictorial Archive. The cover layout was produced with Quark XPress 3.3 using the ITC Garamond font. The CD design was created by Hanna Dyer. The inside layout was designed by Edie Freedman, Jennifer Niederst, and Nancy Priest. Text was prepared by Erik Ray in SGML DocBook 2.4 DTD. The print version of this book was created by translating the SGML source into a set of gtroff macros using a filter developed at ORA by Norman Walsh. Steve Talbott designed and wrote the underlying macro set on the basis of the GNU troff -gs macros; Lenny Muellner adapted them to SGML and implemented the book design. The GNU groff text formatter version 1.09 was used to generate PostScript output. The text and heading fonts are ITC Garamond Light and Garamond Book. The illustrations that appear in the book were created in Macromedia Freehand 5.0 by Chris Reilley. |
|
Description
|
Table of Contents
|
Product Details
|
About the Author
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Andy Baron, Ken Getz, Paul Litwin
February 2002
By David Pogue
December 2001
By Nan Barber, David Reynolds
May 2001
|
Customer Reviews
7/27/2006 (0 of 1 customers found this review helpful) By msoulier from Undisclosed 6/2/2005 4.0The definitive guide to python By EvilGuru from Undisclosed 1/22/2003 2.0Programming Python, 2nd Edition Review By Aki Niimura from Undisclosed 7/13/2002 4.0Programming Python, 2nd Edition Review By Dominic Fox from Undisclosed 6/12/2001 1.0Programming Python, 2nd Edition Review By Joakim Hove from Undisclosed 4/27/2001 4.0Programming Python, 2nd Edition Review By Bob Tribit from Undisclosed 3/30/2001 3.0Programming Python, 2nd Edition Review By Todd Warner from Undisclosed
|
|
|