Results 1 to 1 of 1
Me and my cousin are making a python text-editor.
and im having trouble getting our program to work with py2exe and im not sure what the problem is.
I set ...
- 06-28-2008 #1
problems making python program work with py2exe
Me and my cousin are making a python text-editor.
and im having trouble getting our program to work with py2exe and im not sure what the problem is.
I set everything up like the py2exe website tell you to and it all went together perfectly fine.
but when i try to run my programs exe the screen goes black for a second and then is normal, and the program never starts. so i start it in command prompt to get some output.
this is the error i got:
so i went and looked through the code and line 92 is this:Code:C:\Python25\dist>Puma-Pad.exe Traceback (most recent call last): File "Puma-Pad.py", line 92, in <module> NameError: name 'quit' is not defined C:\Python25\dist>
the last line above is 92Code:filemenu = Menu(menu) menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New", command=new) filemenu.add_command(label="Open", command=open1) filemenu.add_command(label="Save", state=DISABLED) filemenu.add_command(label="Save As", command = saveas1) filemenu.add_command(label="Exit", command=quit)
so i thought quit was the command to exit?
so i tried it with the command being exit
and this is what happensCode:filemenu = Menu(menu) menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New", command=new) filemenu.add_command(label="Open", command=open1) filemenu.add_command(label="Save", state=DISABLED) filemenu.add_command(label="Save As", command = saveas1) filemenu.add_command(label="Exit", command=exit)
im really stumped about this, i have no idea what command im supposed to use for it to just kill the program.Code:Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\cody>cd My Documents\python\Puma-pad\dist C:\Documents and Settings\cody\My Documents\python\Puma-pad\dist>Puma-Pad Traceback (most recent call last): File "Puma-Pad.py", line 92, in <module> filemenu.add_command(label="Exit", command=exit) NameError: name 'exit' is not defined C:\Documents and Settings\cody\My Documents\python\Puma-pad\dist>
thx for the helpMicrosoft isn't evil, they just make really crappy operating systems.
Linus Torvalds
Personal and politically centrist blog.--->http://www.deathnerd.com


Reply With Quote