next up previous contents
Next: 2.2.5 The Interactive Startup Up: 2.2 The Interpreter and Previous: 2.2.3 ``Compiled'' Python files

2.2.4 Executable Python scripts

On BSD'ish Unix systems, Python scripts can be made directly executable, like shell scripts, by putting the line

#! /usr/local/bin/python
(assuming that's the name of the interpreter) at the beginning of the script and giving the file an executable mode. The #! must be the first two characters of the file.



guido@cnri.reston.va.us