def wrapper(func, with_screen=False): if with_screen: ScreenManager.init() error = None try: func() except WLQuit: pass except WLError as exc: error = exc finally: if with_screen: ScreenManager.quit() if error is not None: sys.stderr.write('%s\n' % error)
def setUp(self): ScreenManager.init()