The Python interactive interpreter

The Python interactive interpreter make it easy to try your first steps in programming and all Python commands. You just issue any command at the command prompt (>>>) one by one and the answer is immediate.

Starting the interactive interpreter in Windows

In Windows click Start -> Programs -> Python -> Python (command line)

Start Python in Windows

This is the Python interactive interpreter prompt in Windows:

Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

To close the interactive interpreter type Ctrl-Z and then Enter

Starting the interactive interpreter in Linux

In Linux open a shell and type python (must be lower case)

$ python

This is the Python interactive interpreter prompt in Linux:

Python 2.4.1 (#1, May 16 2005, 15:19:29)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

To close the Python interactive interpreter in Linux type Ctrl-D

computer programming degree learning course tutorial