Programming Python with CDROM

Overview

Programming Python is a classic O'Reilly Nutshell Handbook® describing the use of the Python programming/scripting language. Python is a popular scripting language freely available over the Net. Like Perl, Python is powerful, but easier to use than a traditional compiler language like C or C++. Although it is used mostly in UNIX environments (including Linux), it is available on Windows and Mac platforms as well. Unlike Perl, Python uses an object-oriented paradigm, making it a particularly useful scripting ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (16) from $1.99   
  • New (1) from $10.59   
  • Used (15) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$10.59
Seller since 2009

Feedback rating:

(851)

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
1565921976 *BRAND NEW* Ships Same Day or Next!

Ships from: Springfield, VA

Usually ships in 1-2 business days

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

Overview

Programming Python is a classic O'Reilly Nutshell Handbook® describing the use of the Python programming/scripting language. Python is a popular scripting language freely available over the Net. Like Perl, Python is powerful, but easier to use than a traditional compiler language like C or C++. Although it is used mostly in UNIX environments (including Linux), it is available on Windows and Mac platforms as well. Unlike Perl, Python uses an object-oriented paradigm, making it a particularly useful scripting language for C++ programmers and the Windows/OLE and Mac environments. This book will serve the Python community as our Programming Perl book does for the Perl community.

This book complements the online reference material provided with the Python releases. It is endorsed by the creator of Python, Guido van Rossum, who wrote the foreword. The CD-ROM included with the book contains Python 1.3 binaries for most popular UNIX platforms, as well as Linux, Windows, NT, and the Mac. This book is the most comprehensive Python user material available from any publisher. It contains a number of running examples, presented simply at first but becoming more complex as new issues appear. Examples describing Graphical User Interface (GUI) programming use the Tk language. (Tk is usually considered a part of the Tcl scripting language, but is in fact usable with other scripting languages like Perl and Python.)

An appendix contains a separate short language tutorial.

Read More Show Less

Product Details

  • ISBN-13: 9781565921979
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 10/8/1996
  • Series: Nutshell Handbooks Series
  • Edition description: BK&CD-ROM
  • Edition number: 1
  • Pages: 902
  • Product dimensions: 7.05 (w) x 9.39 (h) x 1.78 (d)

Meet the Author

Mark Lutz is a leading Python trainer, the author of Python’s earliest and best-selling texts, and a pioneering figure in the Python world.

Mark is the author of the three O’Reilly books: Learning Python, Programming Python, and Python Pocket Reference, all currently in fourth or fifth editions. He has been using and promoting Python since 1992, started writing Python books in 1995, and began teaching Python classes in 1997. As of Spring 2013, Mark has instructed 260 Python training sessions, taught roughly 4,000 students in live classes, and written Python books that have sold 400,000 units and been translated to at least a dozen languages.

Together, his two decades of Python efforts have helped to establish it as one of the most widely used programming languages in the world today. In addition, Mark has been in the software field for 30 years. He holds BS and MS degrees in computer science from the University of Wisconsin where he explored implementations of the Prolog language, and over his career has worked as a professional software developer on compilers, programming tools, scripting applications, and assorted client/server systems.

Mark maintains a training website (http://learning-python.com) and an additional book support site on the Web (http://www.rmi.net/~lutz).

Read More Show Less

Read an Excerpt


Chapter 1: So What's Python?

"And Now for Something Completely Different.."

This book is about using Python, a public-domain programming language. In acronyms, Python is both a very-high-level language (VHLL), and an object-oriented dynamic language (OODL). As a preliminary definition, Python can be described as a new kind of language tool. For many users, its
  • Support for object-oriented development
  • Powerful programming constructs
  • Extendible and embeddable architecture
  • Remarkably clear syntax and coherent design

make it almost ideal as both a scripting interface for modern systems, and a stand-alone rapid- development language. For example, Python's object-oriented nature mixes well with frameworks written in C++. And as a standalone tool, Python is commonly used in domains such as system administration, graphical user interfaces, internet scripting, and database programming. We'll refine this description in a moment.

The Life of Python

Python was invented around 1990 by Guido van Rossum, at CWI in Amsterdam. Despite the reptiles, it's named after the BBC comedy series Monty Python's Flying Circus. 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 for a wide variety of domains. It's now used by a growing number of engineers around the world, in increasingly diverse roles. For instance, a number of companies use Python in commercial products, for tasks such as GUI development tools, WWW scripting, interactive television, rapid program development, on-site customization of C++ class libraries, and more.

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 this book was being written, Python's homepage debuted on the WWW at http://www.python.org/.

To help manage Python's growth, an informal organization aimed at supporting Python developers has begun taking shape: the Python Software Activity, or PSA for short. Despite its public domain status, Python is a well-supported system, thanks to the dedication of its inventor and the Python community. For example, the PSA facilitates Python workshops, and maintains a software and resources locator service.


"Buses considered harmful"

The PSA was originally formed in response to a thread on the Python newsgroup, which posed the semiserious question: "What would happen if Guido was hit by a bus?" Guido van Rossum still manages most new developments in Python, but the PSA and Python's user-base help support the language, work on extensions, etc. Given Python's popularity, and the PSA infrastructure, bus attacks seem less threatening now; of course I can't speak for Guido ...

Finally, Python is true freeware: there are no restrictions on copying it, or distributing it with your products. it comes with complete source code, a debugger and profiler, built-in interfaces to common external services, plus tools for adding other interfaces. System functions, GUls, and databases are supported "out of the box." Python programs run on most platforms, including nearly all flavors of UNIX, PCs (DOS, Windows, OS/2), the Macintosh, and others. And by the time you read this, Python should be part of most Linux distributions.

What's All the Excitement About?

Back to our description. Python has been called a "next-generation scripting language." This definition probably summarizes the language's distinctions, and the theme of this book, better than most. Although different people like different things about Python, there are some common reasons underlying its popularity. Some of the central points in the "Python philosophy" are:

Coherence

A scripting language doesn't have to be hard to read, write, and maintain. Issues of aesthetics and readability need not be sacrificed in the interest of utility. With the right tool, there's no reason to abandon normal standards of quality, even for "quick and dirty" code.

Power

An extension language doesn't have to have limited functionality. The design goals of embeddability and semantic power aren't necessarily contradictory: an extension tool can also be a full-featured programming language
.

Scope

A dynamic language can be used for more than trivial tasks. There's no reason that a language can't both provide rapid response during the development cycle and also have features that make it useful for building more advanced systems.

Objects

Object-oriented programming can be a useful paradigm, given the right tool. When easy to apply, OOP can be a powerful tool for structuring and reusing code. An object- oriented language doesn't necessarily also have to be complex or difficult to use.

Integration

No language is an island. By providing both a powerful dynamic language, and well- defined interfaces to other languages, Python fosters hybrid systems that simultaneously leverage the rapid turnaround of Python, and the efficiency of C.

Python's integration support is a crucial property: as we'll see, much of Python's power comes from its open design, and its interfaces to external services. In fact, some consider Python's library of existing interfaces to be among its greatest assets. As we'll see, embedding APIs in a high-level language like Python makes them easier to use. Moreover, Python's integration tools make it practical to embed Python in products, and to apply paradigms such as rapid prototyping and rapid development.

But compared to other public-domain scripting languages, the first two points here- coherence and semantic power-may be Python's biggest distinctions. Aesthetic issues such as readability and design coherence are always hard to define, but crucial in a programming tool. As one Python user put it,

"Python looks like it was designed, not accumulated."
Python's inventor has done a extraordinary job of balancing the goals of simplicity and utility. We'll see that Python's clear syntax and high-level tools encourage the creation of easy-to-read, reusable software.

We'll also find that Python programs tend to resemble traditional languages such as C and Pascal, rather than scripting languages like Perl or Tcl. In fact, Python is something of a scripting language in the guise of a traditional language. Another observer summarized this fusion of ideas well:

"Python bridges the gap between scripting languages and C."
By providing a full-featured programming language and supporting modern development paradigms, Python brings programming tools used for more substantial systems to the scripting world. For example, C is poor for fast prototyping, and awk is almost useless for designing large systems, but Python does both well. In short, Python is a simple but powerful language, suitable both for "quick and dirty" scripts and medium-to-large-scale systems development.

Is it a "scripting language" or an "extension language"?

The terms "scripting language" and "extension language" are often used interchangeably to refer to an embedded, interpreted language component. Unfortunately, "scripting language" sometimes denotes system administration languages, used for writing shell tools. Since Python can be used in both roles, we'll use both terms too. But the term "scripting" isn't meant to imply that Python is just a shell tools language. For instance, we'll see that embedded Python code can take many forms: character strings, objects in module files, executable script files, and more.

...
Read More Show Less

Table of Contents

Foreword
Preface
1 So What's Python? 3
2 A Sneak Preview 11
3 Getting Started 66
4 Writing Basic Shell Tools 81
5 Variations on a Theme 118
6 Adding a Functional Interface 137
7 Adding a Simple User Interface 156
8 Adding Text-Based Menus 181
9 Moving Menus to Classes 210
10 More Class Magic 250
11 Graphical User Interfaces 307
12 Persistent Information 387
13 Implementing Objects 437
14 Extending Python 505
15 Embedding Python 571
16 Processing Language and Text 640
Conclusion: Python and the Development Cycle 697
App. A ... And Other Cool Stuff 717
App. B Futurisms 754
App. C A Mini-Reference 759
App. D An Application Framework 792
App. E A Python Tutorial 813
App. F Python Classes for C++ Programmers 854
Bibliography 858
Glossary 861
Index 867
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)