wxGlade tutorial
Peter Bradley <[email protected]>
| Newsgroups | gmane.comp.python.wxglade |
|---|---|
| Message-ID | <[email protected]> |
I have been trying to follow the wxGlade tutorial. With some difficulty
I got some generated code that looked as though it would be OK, but when
I tried to run it, I got the following error from Python3:
Traceback (most recent call last):
File "/home/peter/wxglade/tutorial01/tut01.py", line 12, in <module>
frame = MyFrame(None)
File "/home/peter/wxglade/tutorial01/tut01.py", line 8, in __init__
wxout.TutorialFrame.__init__(self,parent)
File "/home/peter/wxglade/tutorial01/wxglade_out.py", line 25, in
__init__
wxglade_tmp_menu.Append(wx.ID_ANY, _("New"), "", wx.ITEM_NORMAL)
NameError: name '_' is not defined
The code I'm using to run the GUI is as follows:
import wx
#import the newly created GUI file
import wxglade_out as wxout
class MyFrame(wxout.TutorialFrame):
def __init__(self,parent):
wxout.TutorialFrame.__init__(self,parent)
app = wx.App(False)
frame = MyFrame(None)
frame.Show(True)
#start the application
app.MainLoop()
There are some other issues, both with the tutorial and with wxGlade
itself (it crashed twice), but if and when I get to actually run the
code I'll look again at the other things, separately.
I'm using wxPython Phoenix, by the way.
Thanks in advance for any help.
Peter
--
*Peter Bradley*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general