def display(self):
# this method starts the main loop and such
self.loop = urwid.MainLoop(self.pile,
self.palette,
handle_mouse = False,
unhandled_input = self.keypress,
pop_ups = True)
self.loop.screen.set_terminal_properties(colors=256)
self.register_palette()
self.term.main_loop = self.loop
try:
self.loop.run()
except:
return 'failure'
with open(TABS_PATH, 'a') as f:
f.write(str(self.layout))
return 'exit'
评论列表
文章目录