def __init__(self, x = -1, y = -1, w = 300, h = 200, title = None): Dialog.__init__(self, x, y, w, h, title) self.setLayout(pyui.layouts.BorderLayoutManager()) self.lines = LineDisplay() self.addChild(self.lines, pyui.locals.CENTER) self.pack() self.oldout = sys.stdout self.oldin = sys.stdin
def __init__(self): Window.__init__(self, 0, 0, getDesktop().width, \ getDesktop().height/4, topmost = 1) self.setLayout(pyui.layouts.BorderLayoutManager()) self.outputBox = LineDisplay() self.addChild(self.outputBox, pyui.locals.CENTER) self.pack() Events.addCallbacks('keyDown', self.keyDown) self.oldout = sys.stdout sys.stdout = self