失效链接处理 |
Python Programming PDF 下载
本站整理下载:
提取码:6s33
相关截图:
主要内容:
1 Overview
Python1
is a high-level2
, structured3
, open-source4 programming language that can be used for a
wide variety of programming tasks. Python was created by Gudio Van Rossum in the early 1990s,
its following has grown steadily and interest is increased markedly in the last few years or so. It is
named after Monty Python's Flying Circus comedy program.
Python5
is used extensively for system administration (many vital components of Linux6 Distributions
are written in it), also its a great language to teach programming to novice. NASA has used Python
for its software systems and has adopted it as the standard scripting language for its Integrated
Planning System. Python is also extensively used by Google to implement many components of its
Web Crawler and Search Engine & Yahoo! for managing its discussion groups.
Python within itself is an interpreted programming language that is automatically compiled into
bytecode before execution (the bytecode is then normally saved to disk, just as automatically, so that
compilation need not happen again until and unless the source gets changed). It is also a dynamically
typed language that includes (but does not require one to use) object oriented features and constructs.
The most unusual aspect of Python is that whitespace is significant; instead of block delimiters
(braces → "{}" in the C family of languages), indentation is used to indicate where blocks begin and
end.
For example, the following Python code can be interactively typed at an interpreter prompt, display
the famous "Hello World!" on the user screen:
>>> print "Hello World!"
Hello World!
Another great Python feature is its availability for all Platforms. Python can run on Microsoft
Windows, Macintosh & all Linux distributions with ease. This makes the programs very portable, as
any program written for one Platform can easily be used at another.
Python provides a powerful assortment of built-in types (e.g., lists, dictionaries and strings), a number
of built-in functions, and a few constructs, mostly statements. For example, loop constructs that
can iterate over items in a collection instead of being limited to a simple range of integer values.
Python also comes with a powerful standard library7
, which includes hundreds of modules to provide
routines for a wide variety of services including regular expressions8
and TCP/IP sessions.
1 http://en.wikibooks.org/wiki/Python
2 http://en.wikibooks.org/wiki/Computer%20programming%2FHighlevel
3 http://en.wikibooks.org/wiki/Computer%20programming%2FStructured%
20programming
4 http://en.wikibooks.org/wiki/Open%20Source
5 http://en.wikibooks.org/wiki/Python
6 http://en.wikibooks.org/wiki/Linux
7 http://en.wikibooks.org/wiki/Python%20Programming%2FStandard%20Library
8 Chapter 21 on page 99
3
Overview
Python is used and supported by a large Python Community9
that exists on the Internet. The mailing
lists and news groups10 like the tutor list11 actively support and help new python programmers.
While they discourage doing homework for you, they are quite helpful and are populated by the
authors of many of the Python textbooks currently available on the market.
|