Python Compiler

If you need help configuring, installing or using anything Linux please post in here.
7 posts Page 1 of 1
Contributors
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Python Compiler
mikethedj4
Is there a way where I can compile my python program (.py) to become just a regular program that I don't haft to run threw the terminal to run it???

Example I don't wanna do this to run it threw the terminal.
Code: Select all
./whatever.py
Example I wanna be able to make the file like an .exe, but for Linux like the one seen below.
Image
Last edited by mikethedj4 on Sat Aug 28, 2010 11:50 pm, edited 2 times in total.
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: Python Compiler
Agust1337
Code: Select all
chmod +x hello.py
./hello.py
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
User avatar
bisnes_niko
Serious Programmer
Serious Programmer
Posts: 409
Joined: Tue Aug 24, 2010 1:21 pm

Re: Python Compiler
bisnes_niko
agust1337 wrote:
Code: Select all
chmod +x hello.py
./hello.py
I just told you that in skype
beep you :D

And thats not a compiler. I mean, it wont generate the for an example '*exe' :P
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Re: Python Compiler
mikethedj4
Agust1337 wrote:
Code: Select all
chmod +x hello.py
./hello.py
That's exactly what I don't wanna do bro, thoughs are the terminal commands for one making the file an executable, and two running the program in the terminal. I wanna be able to make the file like the one seen below where I can just double click it and run it.
executable.png
You do not have the required permissions to view the files attached to this post.
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Python Compiler
mandai
There is a utility for Linux called Freeze which is part of the Python runtime. You can use that to generate compiled executables.
http://wiki.python.org/moin/Freeze
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Re: Python Compiler
mikethedj4
Freeze works, but it makes a huge list of files, and makes it a lot bigger than it's suppose to be, I looked into pyinstaller, which I got errors as well as cxpython, and py2app (works with linux, and mac os x)
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Re: Python Compiler
mikethedj4
Yo if anyone's wondering this, I just got the answer on Stack Overflow.
7 posts Page 1 of 1
Return to “Help & Support”