|
|

Python on Willow
General Information
Version: 2.5
Executable: /usr/local/bin/python
Description
Python is an object-oriented, high-level programming language.
Python can be run in either interactive or interpreted mode. In interactive mode, the user types code directly into the python interface, and the python interpreter immediately executes the user's code at the end of each line or block entered. In interpreted mode, the user first creates a program in a text editor, and then feeds the entire program into the python interpreter, at which time it is executed as a whole.
Users of Willow should already have the python executable in their PATH.
To invoke the interactive mode, type:
python
To interpret a previously written program, type:
python my_program.py
Simple Example
This is a complete python program that will first add 2 + 2, print the result, and then print the numbers 0 to 9 on a single line:
#pythontest.py
# add 2 + 2
print "2 + 2 = ", 2 + 2
# print just an empty line
print
# display numbers 0 to 9
for number in range(10):
print number,
|
More Information about Python
Python Tutorial - Written by the creator of Python
Python (programming language) - Wikipedia article on Python
|