Programming Python: Object-Oriented Scripting

Overview

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, ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (9) from $3.97   
  • New (3) from $27.92   
  • Used (6) from $3.97   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$27.92
Seller since 2008

Feedback rating:

(167)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
0596000855 BRAND NEW NEVER USED IN STOCK 125,000+ HAPPY CUSTOMERS SHIP EVERY DAY WITH FREE TRACKING NUMBER

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$60.00
Seller since 2014

Feedback rating:

(113)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$60.00
Seller since 2014

Feedback rating:

(113)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

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.

Read More Show Less

Editorial Reviews

From The Critics
Written for programmers, this guide describes the advanced uses of the Python language, with a focusing on real-world applications. Coverage includes Internet scripting, system programming, GUI programming, and C integration. Also described are the new aspects of Python 2.0, including its tools, applications, Jython, Active Scripting and COM extensions, Zope, code generators, thread support, and protocol modules. A platform-neutral CD-ROM contains examples, the Python 2.0 source code distribution, the Zope web application framework, code generators, and PMW megawidgets library. Lutz is a software developer. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780596000851
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 3/28/2001
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 1296
  • Product dimensions: 6.97 (w) x 9.17 (h) x 2.02 (d)

Meet the Author

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.

Read More Show Less

Read an Excerpt

1: Introducing Python

"And Now for Something Completely Different"

This book is about using Python, a very high-level, object-oriented, open source" programming language, designed to optimize development speed. Although it is completely general-purpose, Python is often called an object-oriented scripting language, partly because of its sheer ease of use, and partly because it is commonly used to orchestrate or "glue" other software components in an application.

If you are new to Python, chances are you've heard about the language somewhere, but are not quite sure what it is about. To help you get started, this chapter provides a nontechnical introduction to Python's features and roles. Most of it will make more sense once you have seen real Python programs, but let's first take a quick pass over the forest before wandering among the trees.

In the preface, I mentioned that Python emphasizes concepts such as quality, productivity, portability, and integration. Since these four terms summarize most of the reasons for using Python, I'd like to define them in a bit more detail:

Quality

Python makes it easy to write software that can be reused and maintained. It was deliberately designed to raise development quality expectations in the scripting world. Python's clear syntax and coherent design almost forces programmers to write readable code-a critical feature for software that may be changed by others. The Python language really does look like it was designed, not accumulated. Python is also well tooled for modern software reuse methodologies. In fact, writing high-quality Python components that may be applied in multiple contexts is almost automatic.

Productivity

Python is optimized for speed of development. It's easy to write programs fast in Python, because the interpreter handles details you must code explicitly in lower-level languages. Things like type declarations, memory management, and build procedures are nowhere to be found in Python scripts. But fast initial development is only one component of productivity. In the real world, programmers must write code both for a computer to execute and for other programmers to read and maintain. Because Python's syntax resembles executable pseudocode, it yields programs that are easy to understand long after they have been written. In addition, Python supports (but does not impose) advanced paradigms such as object-oriented programming, which further boost developer productivity and shrink development schedules.

Portability

Most Python programs run without change on almost every computer system in use today. In fact, Python programs run today on everything from IBM mainframes and Cray Supercomputers to notebook PCs and handheld PDAs. Although some platforms offer nonportable extensions, the core Python language and libraries are platform-neutral. For instance, most Python scripts developed on Linux will generally run on Windows immediately, and vice versa-simply copy the script over. Moreover, a graphical user interface (GUI) program written with Python's standard Tkinter library will run on the X Windows system, Microsoft Windows, and the Macintosh, with native look-and-feel on each, and without modifying the program's source code at all.

Integration

Python is designed to be integrated with other tools. Programs written in Python can be easily mixed with and script (i.e., direct) other components of a system. Today, for example, Python scripts can call out to existing C and C++ libraries, talk to Java classes, integrate with COM and CORBA components, and more. In addition, programs written in other languages can just as easily run Python scripts by calling C and Java API functions, accessing Pythoncoded COM servers, and so on. Python is not a closed box.

In an era of increasingly short development schedules, faster machines, and heterogeneous applications, these strengths have proven to be powerful allies in both small and large development projects. Naturally, there are other aspects of Python that attract developers, such as its simple learning curve for developers and users alike, libraries of precoded tools to minimize up-front development, and completely free nature that cuts product development and deployment costs.

But Python's productivity focus is perhaps its most attractive and defining quality. As I write this, the main problem facing the software development world is not just writing programs quickly, but finding developers with time to write programs at all. Developers' time has become paramount-much more critical than execution speed. There are simply more projects than programmers to staff them.

As a language optimized for developer productivity, Python seems to be the right answer to the questions being asked by the development world. Not only can Python developers implement systems quickly, but the resulting systems will be maintainable, portable, and easily integrated with other application components.

The Life of Python

Python was invented around 1990 by Guido van Rossum, when he was at CWI in Amsterdam. Despite the reptiles, it is named after the BBC comedy series Monty Python's Flying Circus, of which Guido is a fan (see the following silly sidebar). Guido was also involved with the Amoeba distributed operating system and the ABC language. In fact, the original motivation for Python was to create an advanced scripting language for the Amoeba system.

But Python's design turned out to be general enough to address a wide variety of domains. It's now used by hundreds of thousands of engineers around the world, in increasingly diverse roles. Companies use Python today in commercial products, for tasks such as testing chips and boards, developing GUIs, searching the Web, animating movies, scripting games, serving up maps and email on the Internet, customizing C++ class libraries, and much more.' In fact, because Python is a completely general-purpose language, its target domains are only limited by the scope of computers in general.

Since it first appeared on the public domain scene in 1991, Python has continued to attract a loyal following, and spawned a dedicated Internet newsgroup, comp. lang.python, in 1994. And as the first edition of this book was being written in 1995, Python's home page debuted on the WWW at http.-llwww.python.org-still the official place to find all things Python...

Read More Show Less

Table of Contents

Foreword;
Preface;
“And Now for Something Completely Different . . . Again”;
Signs of the Python Times;
Why This Edition?;
Major Changes in This Edition;
Using the Examples and Demos;
Conventions Used in This Book;
Where to Look for Updates;
Contacting O’Reilly;
Acknowledgments;
Chapter 1: Introducing Python;
1.1 “And Now for Something Completely Different”;
1.2 The Life of Python;
1.3 The Compulsory Features List;
1.4 What’s Python Good For?;
1.5 What’s Python Not Good For?;
System Interfaces;
Chapter 2: System Tools;
2.1 “The os.path to Knowledge”;
2.2 Why Python Here?;
2.3 System Scripting Overview;
2.4 The sys Module;
2.5 The os Module;
2.6 Script Execution Context;
2.7 Current Working Directory;
2.8 Command-Line Arguments;
2.9 Shell Environment Variables;
2.10 Standard Streams;
2.11 File Tools;
2.12 Directory Tools;
Chapter 3: Parallel System Tools;
3.1 “Telling the Monkeys What to Do”;
3.2 Forking Processes;
3.3 Threads;
3.4 Program Exits;
3.5 Interprocess Communication;
3.6 Pipes;
3.7 Signals;
3.8 Launching Programs on Windows;
3.9 Other System Tools;
Chapter 4: Larger System Examples I;
4.1 “Splits and Joins and Alien Invasions”;
4.2 Splitting and Joining Files;
4.3 Generating Forward-Link Web Pages;
4.4 A Regression Test Script;
4.5 Packing and Unpacking Files;
4.6 User-Friendly Program Launchers;
Chapter 5: Larger System Examples II;
5.1 “The Greps of Wrath”;
5.2 Fixing DOS Line Ends;
5.3 Fixing DOS Filenames;
5.4 Searching Directory Trees;
5.5 Visitor: Walking Trees Generically;
5.6 Copying Directory Trees;
5.7 Deleting Directory Trees;
5.8 Comparing Directory Trees;
GUI Programming;
Chapter 6: Graphical User Interfaces;
6.1 “Here’s Looking at You, Kid”;
6.2 Python GUI Development Options;
6.3 Tkinter Overview;
6.4 Climbing the GUI Learning Curve;
6.5 The End of the Tutorial;
6.6 Python/Tkinter for Tcl/Tk Converts;
Chapter 7: A Tkinter Tour, Part 1;
7.1 “Widgets and Gadgets and GUIs, Oh My!”;
7.2 Configuring Widget Appearance;
7.3 Toplevel Windows;
7.4 Dialogs;
7.5 Binding Events;
7.6 Message and Entry;
7.7 Checkbutton, Radiobutton, and Scale;
7.8 Running GUI Code Three Ways;
7.9 Images;
Chapter 8: A Tkinter Tour, Part 2;
8.1 “On Today’s Menu: Spam, Spam, and Spam”;
8.2 Menus;
8.3 Listboxes and Scrollbars;
8.4 Text;
8.5 Canvas;
8.6 Grids;
8.7 Time Tools, Threads, and Animation;
8.8 The End of the Tour;
8.9 The PyDemos and PyGadgets Launchers;
Chapter 9: Larger GUI Examples;
9.1 “Building a Better Mouse Trap”;
9.2 Advanced GUI Coding Techniques;
9.3 Complete Program Examples;
9.4 PyEdit: A Text Editor Program/Object;
9.5 PyView: An Image and Notes Slideshow;
9.6 PyDraw: Painting and Moving Graphics;
9.7 PyClock: An Analog/Digital Clock Widget;
9.8 PyToe: A Tic-Tac-Toe Game Widget;
9.9 Where to Go from Here;
Internet Scripting;
Chapter 10: Network Scripting;
10.1 “Tune in, Log on, and Drop out”;
10.2 Plumbing the Internet;
10.3 Socket Programming;
10.4 Handling Multiple Clients;
10.5 A Simple Python File Server;
Chapter 11: Client-Side Scripting;
11.1 “Socket to Me!”;
11.2 Transferring Files over the Net;
11.3 Processing Internet Email;
11.4 The PyMailGui Email Client;
11.5 Other Client-Side Tools;
Chapter 12: Server-Side Scripting;
12.1 “Oh What a Tangled Web We Weave”;
12.2 What’s a Server-Side CGI Script?;
12.3 Climbing the CGI Learning Curve;
12.4 The Hello World Selector;
12.5 Coding for Maintainability;
12.6 More on HTML and URL Escapes;
12.7 Sending Files to Clients and Servers;
Chapter 13: Larger Web Site Examples I;
13.1 “Things to Do When Visiting Chicago”;
13.2 The PyMailCgi Web Site;
13.3 The Root Page;
13.4 Sending Mail by SMTP;
13.5 Reading POP Email;
13.6 Utility Modules;
13.7 CGI Script Trade-offs;
Chapter 14: Larger Web Site Examples II;
14.1 “Typos Happen”;
14.2 The PyErrata Web Site;
14.3 The Root Page;
14.4 Browsing PyErrata Reports;
14.5 Submitting PyErrata Reports;
14.6 PyErrata Database Interfaces;
14.7 Administrative Tools;
14.8 Designing for Reuse and Growth;
Chapter 15: Advanced Internet Topics;
15.1 “Surfing on the Shoulders of Giants”;
15.2 Zope: A Web Publishing Framework;
15.3 HTMLgen: Web Pages from Objects;
15.4 JPython ( Jython): Python for Java;
15.5 Grail: A Python-Based Web Browser;
15.6 Python Restricted Execution Mode;
15.7 XML Processing Tools;
15.8 Windows Web Scripting Extensions;
15.9 Python Server Pages;
15.10 Rolling Your Own Servers in Python;
Assorted Topics;
Chapter 16: Databases and Persistence;
16.1 “Give Me an Order of Persistence, but Hold the Pickles”;
16.2 Persistence Options in Python;
16.3 DBM Files;
16.4 Pickled Objects;
16.5 Shelve Files;
16.6 SQL Database Interfaces;
16.7 PyForm: A Persistent Object Viewer;
Chapter 17: Data Structures;
17.1 “Roses Are Red, Violets Are Blue; Lists Are Mutable, and So Is Class Foo”;
17.2 Implementing Stacks;
17.3 Implementing Sets;
17.4 Binary Search Trees;
17.5 Graph Searching;
17.6 Reversing Sequences;
17.7 Permuting Sequences;
17.8 Sorting Sequences;
17.9 Data Structures Versus Python Built-ins;
17.10 PyTree: A Generic Tree Object Viewer;
Chapter 18: Text and Language;
18.1 “See Jack Hack. Hack, Jack, Hack”;
18.2 Strategies for Parsing Text in Python;
18.3 String Module Utilities;
18.4 Regular Expression Matching;
18.5 Parser Generators;
18.6 Hand-Coded Parsers;
18.7 PyCalc: A Calculator Program/Object;
Integration;
Chapter 19: Extending Python;
19.1 “I Am Lost at C”;
19.2 C Extensions Overview;
19.3 A Simple C Extension Module;
19.4 The SWIG Integration Code Generator;
19.5 Wrapping C Environment Calls;
19.6 A C Extension Module String Stack;
19.7 A C Extension Type String Stack;
19.8 Wrapping C++ Classes with SWIG;
Chapter 20: Embedding Python;
20.1 “Add Python. Mix Well. Repeat.”;
20.2 C Embedding API Overview;
20.3 Basic Embedding Techniques;
20.4 Registering Callback Handler Objects;
20.5 Using Python Classes in C;
20.6 ppembed: A High-Level Embedding API;
20.7 Other Integration Topics;
The End;
Chapter 21: Conclusion: Python and the Development Cycle;
21.1 “That’s the End of the Book, Now Here’s the Meaning of Life”;
21.2 “Something’s Wrong with the Way We Program Computers”;
21.3 The “Gilligan Factor”;
21.4 Doing the Right Thing;
21.5 Enter Python;
21.6 But What About That Bottleneck?;
21.7 On Sinking the Titanic;
21.8 So What’s Python: The Sequel;
21.9 In the Final Analysis...;
21.10 Postscript to the Second Edition;
Recent Python Changes;
Major Changes in 2.0;
Major Changes in 1.6;
Major Changes Between 1.3 and 1.5.2;
Pragmatics;
Installing Python;
Book Examples Distribution;
Environment Configuration;
Running Python Programs;
Python Internet Resources;
Python Versus C++;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)