1

Sorry if my title is not correct. Below is the explanation of what i'm looking for.

I've coded a small GUI game (let say a snake game) in python, and I want it to be run on Linux machine. I can run this program by just run command "python snake.py" in the terminal.

However, I want to combine all my .py files into one file, and when I click on this file, it just run my game. I don't want to go to shell and type "python snake.py". I means something like manifest .jar in java.

Could any one help me please? If my explanation is not good enough, please let me know. I'll give some more explanation.

2
  • 1
    I am not very executed about this question's title. Commented Oct 6, 2012 at 19:18
  • You can create a .desktop file to run your game. Commented Oct 6, 2012 at 19:21

2 Answers 2

2

You can use Freeze for Unix, or py2exe for Windows.

cx_freeze, PyInstaller, bbfreeze and py2app - which I have never tried - are also available for various platforms, so there are many options.

Sign up to request clarification or add additional context in comments.

Comments

1

If you only want it to run on a Linux machine, using Python eggs is the simplest way.

python snake.egg will try to execute the main.py inside the egg.

Python eggs are meant to be packages, and basically is a zip file with metadata files included.

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.