#Boa:Frame:Frame1
# -*- coding: utf-8 -*-
import wx
class HelloFrame(wx.Frame):
def __init__ (self):
wx.Frame.__init__ (self, id=-1, parent=None, pos=wx.Point(422,270), size=wx.Size(300,200), title='Hello Frame')
self.panel = wx.Panel(self)
self.helloButton = wx.Button(id=-1, label='Нажми меня', parent=self.panel,
pos=wx.Point(110,75), size=wx.Size(80,30))
self.panel.Bind(wx.EVT BUTTON,
self.OnButtonClick, self.helloButton)
def OnButtonClick(self, event):
print 'ку-ку!!!'
class HelloApp(wx.App):
def OnInit(self):
frame = FuckFrame()
frame.Show(True)
return True
if name == '__main__':
app = HelloApp()
app.MainLoop()
писалось в boa-constructor linux . Ошибка : expected an indented block в этой строке:
wx.Frame.init (self, id=-1, parent=None, pos=wx.Point(422,270), size=wx.Size(300,200), title='Hello Frame')