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.