Python (programming language): Difference between revisions
imported>Jitse Niesen m (→History: languanges are not "founded"; not sure what the correct word here is but I changed it to published - also, replace <br/> with empty lines) |
imported>Aleksander Stos (→Hello World: some sauce added) |
||
Line 9: | Line 9: | ||
===Hello World=== | ===Hello World=== | ||
The code for traditional "hello world" program can hardly be simpler: | |||
<code> print 'Hello World'</code> | |||
This is either put in a file "hello.py" and executed with | |||
<code> python hello.py </code> | |||
from the usual command line of the operating system or typed directly in the interactive Python environment (Python command line or [[IDLE (Python programming language)|IDLE]]). | |||
==Implementations== | ==Implementations== |
Revision as of 07:03, 30 August 2007
Python is a dynamic object-oriented, general purpose programming language which runs on many different computer platforms and mobile devices. Python is open source software and is published under an OSI-approved license. Python aims to be a language that is efficient, coherent, readable, and fun to use. Because Python is an interpreted language, Python programs run immediately without the need for lengthy compile and link steps.
History
Python was published by Guido van Rossum in 1991, and to this day, Guido remains the project leader.
Python reached version 1.0 in 1994.
Syntax
Hello World
The code for traditional "hello world" program can hardly be simpler:
print 'Hello World'
This is either put in a file "hello.py" and executed with
python hello.py
from the usual command line of the operating system or typed directly in the interactive Python environment (Python command line or IDLE).
Implementations
Python's official distribution is known as CPython. It's written in C and functions as a virtual machine interpreting bytecode-compiled Python programs. Jython is an implementation for the Java Virtual Machine, which can run either standalone (like CPython) or as an embedded scripting engine. IronPython is an implementation for the Common Language Runtime (.NET and Mono). PyPy is an implementation written in Python that targets several backends, including C, LLVM, JavaScript, JVM and CLR.
See also
- IDLE, the Integrated Development Environment for Python
Books
- Beazley, David M. Python Essential Reference, 3rd Ed. Sams, 2006 ISBN 0672328623
- Chun, Wesley J. Core Python Programming, 2nd Ed. Prentice Hall, 2006 ISBN 0132269937
- Goerzen, John. Foundations Of Python Network Programming Apress, 2006 ISBN 1590593715
- Hetland, Magnus Lie. Beginning Python: From Novice To Professional Apress, 2005 ISBN 159059519X
- Lutz, Mark. Programming Python, 3rd Ed. O'Reilly, 2006 ISBN 0596009259
- Lutz, Mark and Ascher, David. Learning Python, 2nd Ed. O'Reilly, 2003 ISBN 0596002815
- Martelli, Alex. Python In A Nutshell, 2nd Ed. O'Reilly, 2006 ISBN 0596001886
- Martelli, Alex. Ravenscroft, Anna. Ascher, David. Python Cookbook, 2nd Ed. O'Reilly, 2005 ISBN 0596007973
- Zelle, John M. Python Programming: An Introduction To Computer Science Franklin Beedle, 2003 ISBN 1887902996