real_edit.py 文件源码

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

项目:Adwear 作者: Uberi 项目源码 文件源码
def read_next_line(self):
        """Read another line from the file."""

        next_line = self.file.readline()

        if not next_line or next_line[-1:] != '\n':
            # no newline on last line of file
            self.file = None
        else:
            # trim newline characters
            next_line = next_line[:-1]

        expanded = next_line.expandtabs()

        edit = urwid.Edit("", expanded, allow_tab=True)
        edit.set_edit_pos(0)
        edit.original_text = next_line
        self.lines.append(edit)

        return next_line
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号