Tuesday, September 25, 2007


Python is a high-level programming language first released by Guido van Rossum in 1991. although this only applies to the core language's syntax and semantics; the standard library provides the language with a large number of additional libraries and extensions.
Python is a multi-paradigm programming language which has a fully dynamic type system and uses automatic memory management; it is thus similar to Perl, Ruby, Scheme, Smalltalk, and Tcl.
The language has an open, community-based development model managed by the non-profit Python Software Foundation. While various parts of the language have formal specifications and standards, the language as a whole is not formally specified. The de facto standard for the language is the CPython implementation.

History

Main article: Python 3 Future development

Main article: Python software Usage

Main article: Python syntax and semantics Syntax and semantics
The mainstream Python implementation, also known as CPython, is written in C compliant to the C89 standard,
Stackless Python is a significant fork of CPython that implements microthreads. It can be expected to run on approximately the same platforms that CPython runs on.
There are two other major implementations: Jython for the Java platform, and IronPython for the .NET platform. PyPy is an experimental self-hosting implementation of Python, in Python, that can output a variety of types of bytecode, object code and intermediate languages.
Several programs exist to package Python programs into standalone executables, including py2exe, PyInstaller, cx_Freeze and py2app.
Many Python programs can run on different Python implementations, on such disparate operating systems and execution environments, without change. In the case of the implementations running on top of the Java virtual machine or the Common Language Runtime, the platform-independence of these systems is harnessed by their respective Python implementation.
Many third-party libraries for Python (and even some first-party ones) are only available on Windows, Linux, BSD, and Mac OS X.
In 2005 Nokia released a Python interpeter for Series 60 mobile phones called PyS60. This includes many of the modules from the regular implementations but also some additional modules for integration with the Symbian operating system. This project has been kept up to date to run on all variants of the S60 platform and there are several third party modules available such as Miso and uitricks

Implementations
Most Python implementations (including CPython, the dominant implementation) can function as a command-line interpreter, where the user enters statements sequentially and receives the results immediately; in short, acting as a shell. While the semantics of the other modes of execution (bytecode compilation, or compilation to native code) preserve the sequential semantics, they offer a speed boost at the cost of interactivity, so they are only used outside of a command-line interaction (for example, importing a module).
Other shells add capabilities beyond those in the basic interpreter, including IDLE and IPython. While generally following the visual style of the Python shell, they implement features like auto-completion, retention of session state, and syntax highlighting.
Some implementations are able to compile to not only bytecode, but to turn Python code into machine code. So far, this has only been done for restricted subsets of Python.
PyPy takes this approach, naming its restricted compilable version of Python RPython.

Interpretational semantics
Python has a large standard library, commonly cited as one of Python's greatest strengths, Python also includes a unit testing framework for creating exhaustive test suites.
Some parts of the standard library are covered by specifications (for example, the WSGI implementation wsgiref follows PEP 333), but the majority of modules are defined by nothing other than their code, documentation and test suite. However, because most of the standard library is cross-platform Python code, there are only a small number of modules which must be altered or completely rewritten by alternative implementations.

Standard library
Python is a multi-paradigm programming language. This means that, rather than forcing programmers to adopt a particular style of programming, it permits several styles: object orientation and structured programming are fully supported, and there are a number of language features which support functional programming and aspect-oriented programming. Many other paradigms are supported using extensions, such as pyDBC and Contracts for Python which allow Design by Contract. Python uses dynamic typing and reference counting for memory management. An important feature of Python is dynamic name resolution, which binds method and variable names during program execution (also known as late binding).
Another target of the language's design is ease of extensibility, rather than having everything built into the language core. New built-in modules are easily written in C or C++. Python can also be used as an extension language for existing modules and applications that need a programmable interface. This design, of a small core language with a large standard library and an easily-extensible interpreter, was intended by van Rossum from the very start, due to his frustrations with ABC, which espoused the opposite mindset.

Neologisms
Python's design and philosophy have influenced several programming languages:
Python's development practices have also been emulated by other languages. The system of requiring a document describing the rationale for and issues surrounding a change to the language (ie, a PEP) is also used in Tcl directly due to Python's influence. Python programming language See also

No comments: