Computing Resources in ESCI

Unix Software: Programming: Python

Description

Python is an interpreted, object oriented programming language. Because it is simple and interpreted, it is often used as a substitute for shell scripts, Perl, or TCL/TK programs.

Location

/usr/site/Python/. Contains binaries (executables), source code (in C), and library code (in Python).

Commands

Typing python at the command prompt will open an interactive python interpretation program where you can enter lines of code one at a time. Files containing Python code can be executed by typing python file with various options as needed, described in the Python man page. Also, as with other Unix scripts such as shell and Perl scripts, a Python program may be made to appear as a standalone program by inserting the line
#!/usr/bin/env python
at the very beginning of the file.

Documentation

The Python Tutorial
The Python man page
If you are serious about learning how to program Python, the best thing you can do would be to pick up a copy of "Programming Python" by O'Reilly and Associates.

See Also

Perl (Practical Extraction and Reporting Language)
TCL/TK
The Unix Shells


Questions? Comments? Please contact Mary Cochran.