Next / Previous / Contents / TCC Help System / NM Tech homepage

3.2. Using Python in Linux

To enter conversational mode on a Linux system, type this command:


Type Control-D to terminate the session.

If you write a Python script named, you can execute it using the command


Under Unix, you can also make a script self-executing by placing this line at the top:

#!/usr/bin/env python

You must also tell Linux that the file is executable by using the command “chmod +x filename”. For example, if your script is called, you would type this command:

chmod +x