result.py 文件源码

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

项目:terminal-leetcode 作者: chishui 项目源码 文件源码
def _append_stdout_if_non_empty(self, list_items):
        std_output = self.result.get('std_output', '')
        if len(std_output) > 0:
            blank = urwid.Divider()
            stdout_header = urwid.Text('Stdout:')
            if len(std_output) > 100:
                std_output = '%s...%s\n(output trimmed due to its length)' %\
                    (std_output[:90], std_output[-10:])
            stdout = urwid.Text(std_output)
            list_items.extend([blank, stdout_header, stdout])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号