- Shopping Bag ( 0 items )
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, ...
Ships from: fallbrook, CA
Usually ships in 1-2 business days
Ships from: acton, MA
Usually ships in 1-2 business days
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.
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:
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.
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.
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.
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...