make python executable

Support for services available to Shell account users.

Moderator: Moderators

make python executable

Postby uroskn_redhat » Mon May 01, 2006 9:29 pm

Is there any way that i can make python script as executable program...

On windows is this possible with py2exe, but is there any way i can do it on linux?
You cant fail unless you quit.
User avatar
uroskn_redhat
Junior Member
 
Posts: 24
Joined: Wed Oct 19, 2005 1:50 am
Location: Slovenija, Slovenske Konjice, Kajuhova X ;-)

Postby afonic » Tue May 02, 2006 12:45 am

If I understood your question correctly you just need to
Code: Select all
chmod +x script.py
and then you can execute the script with
Code: Select all
./script.py
given that python is installed and working.

Someone correct me if I'm wrong!
User avatar
afonic
Forum Admin
Forum Admin
 
Posts: 686
Joined: Tue Oct 14, 2003 11:11 pm
Location: Salonica, Greece

Postby dillona_aix » Tue May 02, 2006 2:28 am

He means he wants to take a python source file and compile it into a native executeable.
I think.

EDIT: Look at http://www.python.org/doc/faq/programming.html#how-can-i-create-a-stand-alone-binary-from-a-python-script
There are 10 types of people in this world, those who understand binary and those who don't.
User avatar
dillona_aix
Moderator
Moderator
 
Posts: 185
Joined: Sun Sep 11, 2005 9:05 pm
Location: USA


Return to Shell accounts

Who is online

Users browsing this forum: No registered users and 10 guests

cron