Professional Documents
Culture Documents
Running Python
Running Python
When starting a new project, create a directory and change into it:
mkdir directoryname
cd directoryname
Running a Python file:
- all Python files should have a .py suffix
python filename.py
Or, add to the top of each Python file:
#!usr/bin/env python
Then file can be run as:
>> ./ filename.py
If permissions are not correct:
chmod +x filename.py