Python Py2exe conversion problem.

swinefire

Beta member
Messages
4
I am relatively new to programming, and this is my first attempt at converting a Python script to a Windows executable. Going off of what I've seen on the internet, Py2exe seems to be the easiest way to do it. I have run a general setup.py script I found on the internet (the only one I can get to work) multiple times. I have run it through IDLE and command prompt, multiple times each, all with the same results. It successfully makes an "Application" file with the correct file name (Troops vs Troops2), but when I try to run it, it tells me that there was an error and it creates a log for me to see what the problem is. This is what it always says:

Traceback (most recent call last):
File "Troops vs Troops2.py", line 87, in ?
File "Troops vs Troops2.py", line 11, in main
EOFError: EOF when reading a line

I've looked through the code and I can't seem to find any errors. Line 87 is actually just the "main()" function so I'm very confused as to the problem. Also, the program runs flawlessly in IDLE, so the problem is out of my range of knowledge. Obviously I have no knowledge about how py2exe works so if you have to tweak the script you want to convert to get it to work, please help me out.

I was wondering if the problem was with the python file I was trying to convert or something with my system, the py2exe script, etc, so I have tried to use the same setup.py script with multiple, simple programs. These small programs like the Hello World program, etc., all create "Application" files also, but when I attempt to run them, they don't produce an error, a log, or anything. They just don't open. Nothing happens.

Here are Pastebin links to the setup.py conversion script I'm using and the program I'm trying to convert, respectively. [Python] setup.py - Pastebin.com
[Python] Troops vs Troops2.py - Pastebin.com

Like I said, I'm relatively new so please use terms I can understand. If I can't convert it using this script, or something like that, please tell me how I can. I really would like to get this to an ".exe" file. Thanks
 
Back
Top Bottom