commander.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:PyAlertMe 作者: jamesleesaunders 项目源码 文件源码
def on_line_entered(self, line):
        if self._cmd:
            try:
                res = self._cmd(line)
            except Exception, e:
                self.output('Error: %s' % e, 'error')
                return
            if res == Commander.Exit:
                raise urwid.ExitMainLoop()
            elif res:
                self.output(str(res))
        else:
            if line in ('q', 'quit', 'exit'):
                raise urwid.ExitMainLoop()
            else:
                self.output(line)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号