Python Introduction
Python is a high-level scripting language combining interpreted, compiled, interactive and object-oriented features.
Python is designed to be highly readable; compared with other languages that often use English keywords and punctuation, it has a more distinctive syntax structure.
-
Python is an interpreted language: This means there is no compilation step during development, similar to PHP and Perl.
-
Python is an interactive language: This means you can, at a Python prompt >>> execute code directly afterwards.
-
Python is an object-oriented language: This means Python supports the object-oriented style or the programming technique of encapsulating code in objects.
-
Python is a beginner's language:For junior programmers, Python is a great language; it supports a wide range of application development, from simple text processing to WWW browsers and games.
History of Python
Python was designed by Guido van Rossum in the late 1980s and early 1990s at the National Research Institute for Mathematics and Computer Science in the Netherlands.
Python itself also evolved from many other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, Unix shell and other scripting languages.
Like Perl, Python source code also follows the GPL (GNU General Public License) protocol.
Python is now maintained by a core development team, with Guido van Rossum still playing a vital role in guiding its progress.
Python 2.7 was designated the last Python 2.x release; besides supporting Python 2.x syntax, it also supports part of the Python 3.1 syntax.
Python features
-
1. Easy to learn:Python has relatively few keywords, a simple structure, and a clearly defined syntax, making it easier to learn.
-
2. Easy to read:Python code is more clearly defined.
-
3. Easy to maintain:Python's success lies in the fact that its source code is quite easy to maintain.
-
4. A broad standard library:One of Python's biggest advantages is its rich libraries. It is cross-platform and is well compatible with UNIX, Windows, and Mac.
-
5. Interactive mode:With support for interactive mode, you can type code into a terminal, execute it, and get results, allowing interactive testing and debugging of code snippets.
-
6. Portable:Thanks to its open-source nature, Python has been ported (that is, made to work) to many platforms.
-
7. Extensible:If you need a piece of critical code that runs very fast, or want to write some algorithms you are unwilling to open source, you can write that part of the program in C or C++ and then call it from your Python program.
-
8. Databases:Python provides interfaces to all major commercial databases.
-
9. GUI Programming:Python supports GUIs that can be created and ported to many system calls.
-
10. Embeddable: You can embed Python into C/C++ programs, giving users of your programs 'scripting' capabilities.