Reputation: 81
Am new to GUI with wxPython.Was trying out this block of code from a book and it produces the following output but no GUI with the message string.Here's the code..
Upvotes: 0
Views: 50
Reputation: 6206
Python is case-sensitive and you need to use an uppercase 'O' in OnInit
.
import wx
class MyApp(wx.App):
def OnInit(self):
wx.MessageBox('Hello Brian', 'wxApp')
return True
app = MyApp()
app.MainLoop()
Upvotes: 1