def addTerminalUi(self): from views.termui import TerminalUi try: objOutput = TerminalUi() objVideOutput = objOutput.addScrollRegion(10, 70, 0, 0) objVide = VidePrinter(self.objFeed, objVideOutput, self.getLogger()) if self.needsFullReplay(): objVide.enableReplay() objVide.start() except: objLogger.error(traceback.format_exc()) if 'objVide' in locals(): objVide.stop() if 'objOutput' in locals(): objOutput.__del__() del objOutput sys.exit() # bit hacky, but exit on a keypress for now try: objOutput.objScreen.getch() except: objLogger.error(traceback.format_exc()) finally: objVide.stop()
def addTerminalPrinter(self): from views.termprint import TerminalOutput objOutput = TerminalOutput() objVide = VidePrinter(self.objFeed, objOutput, self.getLogger()) if self.needsFullReplay(): objVide.enableReplay() objVide.start() # bit hacky, but exit on a keypress for now try: sys.stdin.read(1) except: self.getLogger().error(traceback.format_exc()) finally: objVide.stop()