Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Programming & Scripting
Reload this Page problems making python program work with py2exe
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Programming & Scripting C, Perl, PHP, Bash Scripts, anything programming or script related post in here!

Reply
 
Thread Tools Display Modes
Old 06-28-2008   #1 (permalink)
thesimplecreator
Linux Newbie
 
thesimplecreator's Avatar
 
Join Date: Jun 2007
Location: washington , USA
Posts: 180
Send a message via MSN to thesimplecreator
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:
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>
so i went and looked through the code and line 92 is this:
Code:
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)
the last line above is 92
so i thought quit was the command to exit?
so i tried it with the command being exit
Code:
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)
and this is what happens
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>
im really stumped about this, i have no idea what command im supposed to use for it to just kill the program.
thx for the help
__________________
Microsoft isn't evil, they just make really crappy operating systems.
Linus Torvalds

registered Linux user number 456650

http://deathnerd.com free phpbb forum hosting
thesimplecreator is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 05:17 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0