0

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.

./whatever.py

Example I wanna be able to make the file like a Windows .exe, but for Linux like the one below, for example.

http://img535.imageshack.us/img535/4883/executable.png

2
  • Why? You'd rather go ./whatever instead? Commented May 4, 2011 at 3:20
  • It already does act like a windows exe, If you open the folder in your favorite file manager you should be able to launch it. Commented May 4, 2011 at 3:24

2 Answers 2

6

You need to add a Shebang at the first line of your file like this:

#!/usr/bin/env python

and make your file executable by typing (in a terminal):

chmod u+x my_file.py
Sign up to request clarification or add additional context in comments.

Comments

2

If you want to make a frozen binary from python scripts, use cx_Freeze

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.