Clone wiki

pyg.exe / Home


Sometimes I make games in Python using PyGame. Sometimes I want people who run Windows to be able to play them without them having to install Python and PyGame on their computers. To achieve that, I usually borrow a computer that is running Windows, install Python, PyGame and Py2Exe on it, and do some magic and a lot of swearing to produce a self-contained executable file with my game. This is getting tedious.

So this time, instead of making a self-contained executable with a game in it, I made a self-contained executable with just Python, PyGame and a simple script that will run whatever you pass it on the command line. That's the whole idea. I hope, that I won't need to compile my games with Py2Exe anymore.


You just download the pyg.exe file that I have build, put it in a directory with your game, and add a start.bat file that contains something like this:


If you use more than one python file, put them all in a directory, like my_awesome_game and the run:

pyg.exe my_awesome_game/

Other tricks