main.py 文件源码

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

项目:scum 作者: CCareaga 项目源码 文件源码
def add(self):
        self.numbers.append(urwid.Text(str(len(self.numbers)+1) + '| ', align='right'))
        if len(str(len(self.numbers)-1)) > self.width:
            self.width += 1
            new_col = urwid.Columns([(self.width+2, self.display.line_nums), self.display.listbox], focus_column=1)
            self.display.top.contents['body'] = (new_col, None)

    # this method simply deletes a line from the end of the line numbers
    # note: we have to check that we didnt delete the last line or we get an index out of bounds!
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号