import wx

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, title="AccessibleWebPad")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True
class MyFrame(wx.Frame):
    def __init__(self, parent, id=wx.ID_ANY, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE, name ="MyFrane"):
        super(MyFrame, self).__init__(parent, id, title, pos, size, style, name)

        # Attributes
        self.panel = wx.Panel(self)
        self.panel.SetBackgroundColour(wx.BLACK)
        self.button = wx.Button(self.panel, label="get children", pos = (50,50))
        self.btnId = self.button.GetId()
        # Event Handliers
        self.Bind(wx.EVT_BUTTON, self.OnButton, self.button)
    def OnButton(self, evemt):
        """Called when the button is click"""
        print "\nFrame GetChildren:"
        for child in self.GetChildren():
            print "%s" % repr(child)
            print "\nPanel FindWindowById:"

if __name__ == "__main__":
    app = MyApp(False)
    app.MainLoop()