- Shopping Bag ( 0 items )
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 ...
Ships from: Phoenix, MD
Usually ships in 1-2 business days
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.
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.
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.
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.
|1||So What's Python?||3|
|2||A Sneak Preview||11|
|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|
|16||Processing Language and Text||640|
|Conclusion: Python and the Development Cycle||697|
|App. A||... And Other Cool Stuff||717|
|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|