Python - Easy programming
Python is a widely used, interpreted language, probably the easier
to learn and to use. One day is sufficient to start programming with
Python. A version of the language is available under Windows, Linux
and any platform. Using a such tool may cut your programming time cost
by two at least. The list built-in functions make it a successor for
Awk and any other text processing language.
More about the language on the official site below. It is free...
Features
Python is an object oriented, interpreted language.
- Variables are dynamic, the type is not declared and may change.
- Indentation is unic to Python for block recognition.
- Tuples are variables or object packed all together, for functions' return, for example.
- Lists and dictionaries are other built-in composed objects.
- Functions embedded inside other functions is another pecularity of the language.
- Can be extended with C modules.
Python 3
Version 3.0 changes the syntax of the language which makes it partially incompatible with the previous ones.
- print x is replaced by print (x).
- Two types of string, data str and not compatible.
- Lists are replaced by views and iterators.
For more information, see What's new in Python.
Why use Python?
With Python you can write in some hours tools that require days to program with other languages. It is very easy to learn, and has powerful features as lists, tuples, dictionaries, allowing you to translate your mind directly as lines of code.
Sites
- Python
The official distribution with a complete tutorial. Thank to the installer to download, installation is very easy. - Jython
A Java compatible version. Compile any Python source to bytecode, interpreted by the Java virtual machine. - Zope
Widely used, open source web application server written entirely in Python.
Sample code
Displaying chars of a string.
s = "demo" for c in s: print c
Displaying elements of a list.
listdemo = [1,2,3] + [4,5]
subdemo = listdemo[1:3]
for num in subdemo:
print num
>>> should print: 2 3 4
(c) 2006-2009 Scriptol.com