I have been recently working on a text game (executes in the console or CMD). I already tested it and it works perfectly. But now I want to make it a SINGLE EXE. I have already done that with other scripts. The proble is that this game is actually made of 3 scripts:main.py ,maps.py, UInterface.py. This are all imported in the main file like this
import maps;
import UInterface as UI;
What can I do to have everything into a single exe and make it work? Repeat, my code already worked, just need compiling
Download and install - py2exe (link here http://www.py2exe.org/)
Create a setup.py like this (in the source dir):
from distutils.core import setup
import py2exe
setup(console = ['main.py'])
And then run as:
python setup.py py2exe
exe will get creted here .\dist\main.exe