Python does not look up scripts on some sort of path.
You have 2 options:
Use the full path:
python /path/to/thescript.py
Place the script in a directory that is on your
PATH
, make it executable (chmod +x thescript.py
) and give it a Shebang line:#!/bin/env python
The second option is probably preferable. On Windows, you can install pylauncher
to support shebang lines; if you use Python 3.3 or newer, it is already included with your Python installation.