def __init__(self,parent): wx.TextCtrl.__init__(self,parent,-1,style = wx.TE_MULTILINE) sys.stdout = self self.Bind(EVT_PRINT, self.OnPrint)