def updateOutput(self): if self.windowOutput == None: wnd = Toplevel() self.windowOutput = PreviewImage(wnd, 'Output', self.imgOutput) else: self.windowOutput.setImage(self.imgOutput)