4 Introduction
Python is a high-level scripting language that combines interpretive, compiled, interactive, and object-oriented features.
Python’s design emphasizes strong readability, often using English keywords and a unique syntax structure compared to other languages.
① An interpreted language: This means there is no compilation step during development, similar to PHP and Perl.
② An interactive language: This means you can execute code directly at a Python prompt >>>.
③ An object-oriented language: This means Python supports object-oriented programming techniques where code is encapsulated in objects.
④ A beginner-friendly language: Python is a great language for novice programmers, supporting a wide range of application development from simple text processing to web browsers and games.
5 Historical Development
Designed by Guido van Rossum in the late 1980s and early 1990s at the Centrum Wiskunde & Informatica in the Netherlands.
It has evolved from many other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, Unix shell, and other scripting languages.
Like Perl, Python’s source code also follows the GPL (GNU General Public License) agreement.
Python is now maintained by a core development team, with Guido van Rossum still playing a crucial role in guiding its progress.
Python 2.0 was released on October 16, 2000, introducing complete garbage collection and support for Unicode.
Python 3.0 was released on December 3, 2008, which is not fully compatible with previous Python source code. However, many new features were later backported to the older Python 2.6/2.7 versions.
Python 3.0, often referred to as Python 3000 or Py3k, represents a significant upgrade over earlier versions of Python.
Python 2.7 has been designated as the last version of Python 2.x, supporting both Python 2.x syntax and some Python 3.1 syntax.
6 Features
1. Easy to learn: Python has relatively few keywords, a simple structure, and a well-defined syntax, making it easier to learn.
2. Easy to read: Python code is defined more clearly.
3. Easy to maintain: Python’s success lies in its source code being relatively easy to maintain.
4. A comprehensive standard library: One of Python’s greatest advantages is its rich library, which is cross-platform and works well on UNIX, Windows, and Macintosh.
5. Interactive mode: The support for interactive mode allows you to input code from the terminal and receive results, facilitating interactive testing and debugging of code snippets.
6. Portable: Due to its open-source nature, Python has been ported (i.e., made to work) on many platforms.
7. Extensible: If you need a piece of code to run quickly or want to write algorithms that you do not wish to open-source, you can use C or C++ to complete that part of the program and then call it from your Python program.
8. Database: Python provides interfaces for all major commercial databases.
9. GUI programming: Python supports GUI creation and can be ported to many system calls.
10. Embeddable: You can embed Python into C/C++ programs, giving your program users the ability to script.
7 Applications
YouTube – Video social networking site
Reddit – Social sharing site
Dropbox – File sharing service
Douban – A database website for cultural products such as books, records, and movies
Zhihu – A Q&A website
Guokr – A general science-themed website
Bottle – A micro web framework for Python
EVE – The online game EVE heavily uses Python for development
Blender – An open-source 3D graphics software that uses Python as a modeling tool and GUI language
Inkscape – An open-source SVG vector graphics editor.
…