Script from the Command-line

A Python script can be executed at command line by invoking the interpreter on your application, as in the following:
$python  script.py          # Unix/Linux

or

python% script.py           # Unix/Linux

or

C:>python script.py         # Windows/DOS
Note: Be sure the file permission mode allows execution.
(3) Integrated Development Environment
You can run Python from a graphical user interface (GUI) environment as well. All you need is a GUI application on your system that supports Python.
  • Unix: IDLE is the very first Unix IDE for Python.
  • Windows: PythonWin is the first Windows interface for Python and is an IDE with a GUI.
  • Macintosh: The Macintosh version of Python along with the IDLE IDE is available from the main website, downloadable as either MacBinary or BinHex'd files.
Before proceeding to next chapter, make sure your environment is properly set up and working perfectly fine. If you are not able to set up the environment properly, then you can take help from your system admin.

All the examples given in subsequent chapters have been executed with Python 2.4.3 version available on CentOS flavor of Linux.