[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版

(yzsuai) #1

So, What’s Python?


As discussed, this book won’t devote much space to Python fundamentals, and we’ll
defer an abstract discussion of Python roles until the Conclusion, after you’ve had a
chance to see it in action firsthand. If you are looking for a concise definition of this
book’s topic, though, try this:


Python is a general-purpose, open source computer programming language. It is opti-
mized for software quality, developer productivity, program portability, and compo-
nent integration. Python is used by at least hundreds of thousands of developers around
the world in areas such as Internet scripting, systems programming, user interfaces,
product customization, numeric programming, and more. It is generally considered to
be among the top four or five most widely-used programming languages in the world
today.


As a popular language focused on shrinking development time, Python is deployed in
a wide variety of products and roles. Counted among its current user base are Google,
YouTube, Industrial Light & Magic, ESRI, the BitTorrent file sharing system, NASA’s
Jet Propulsion Lab, the game Eve Online, and the National Weather Service. Python’s
application domains range from system administration, website development, cell
phone scripting, and education to hardware testing, investment analysis, computer
games, and spacecraft control.


Among other things, Python sports a remarkably simple, readable, and maintainable
syntax; integration with external components coded in other languages; a multi-
paradigm design, with OOP, functional, and modular structures; and a vast collection
of precoded interfaces and utilities. Its tool set makes it a flexible and agile language,
ideal for both quick tactical tasks as well as longer-range strategic application devel-
opment efforts. Although it is a general-purpose language, Python is often called a
scripting language because it makes it easy to utilize and direct other software
components.


Perhaps Python’s best asset, though, is simply that it makes software development more
rapid and enjoyable. There is a class of people for whom programming is an end in
itself. They enjoy the challenge. They write software for the pure pleasure of doing so
and often view commercial or career reward as secondary consequence. This is the class
that largely invented the Internet, open source, and Python. This is also the class that
has historically been a primary audience for this book. As they’ve often relayed, with
a tool like Python, programming can be just plain fun.


To truly understand how, read on; though something of a side effect, much of this book
serves as a demonstration of Python’s ideals in action in real-world code. As we’ll see,
especially when combined with toolkits for GUIs, websites, systems programming, and
so on, Python serves as enabling technology.


Preface | xxxix
Free download pdf