What do I use on linux to make a python program executable


Question

I just installed a linux system (Kubuntu) and was wondering if there is a program to make python programs executable for linux.

1
71
6/16/2012 9:05:00 AM

Accepted Answer

Just put this in the first line of your script :

#!/usr/bin/env python

Make the file executable with

chmod +x myfile.py

Execute with

./myfile.py
130
11/20/2008 10:32:27 AM

If you want to obtain a stand-alone binary application in Python try to use a tool like py2exe or PyInstaller.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon