PDA

View Full Version : python executables



taxonrath
February 14th, 2007, 04:05 AM
Im using IDLE and i was wondering how to make an executable with it. I havent found anything about it using google. Can I even do it with IDLE? or am I just not looking hard enough?

Mirrorball
February 14th, 2007, 04:15 AM
Just save your script as a text file with a .py extension and run it like this:

python whatever.py
Python executables are just ordinary text files.

kthakore
February 14th, 2007, 04:23 AM
if you put:


#!/usr/bin/python

put this int he 1st line of you .py file, and then make it an executable, by either

chmod 0777 yourfile.py

then when you double click on yourfile.py it will open up. If it is a console app open it in a terminal.