What I'm doing is trying to open a text file, but if it's not there, then I
tell the code to exit(), and while it works when running the source code using
the python executable, after I have run the code through py2exe, and then try
testing it, I get the following message:
Traceback (most recent call last):
File "mapData.py", line 39, in <module>
NameError: name 'exit' is not defined
The following is the actual little bit of code that's generating this after
being py2exe'ed - the last line is the line number being mentioned above:
try:
fData = open(sMapName + ".txt", "r")
except:
fData = None
finally:
if not bool(fData): print("invalid map name - " + sMapName + ".txt");
exit()
Any thoughts/ideas/alternative workarounds?
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32