screen.py 文件源码

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

项目:watchmen 作者: lycclsltt 项目源码 文件源码
def __init__(self, r=24, c=80, encoding='latin-1', encoding_errors='replace'):
        '''This initializes a blank screen of the given dimensions.'''

        self.rows = r
        self.cols = c
        self.encoding = encoding
        self.encoding_errors = encoding_errors
        if encoding is not None:
            self.decoder = codecs.getincrementaldecoder(encoding)(encoding_errors)            
        else:
            self.decoder = None
        self.cur_r = 1
        self.cur_c = 1
        self.cur_saved_r = 1
        self.cur_saved_c = 1
        self.scroll_row_start = 1
        self.scroll_row_end = self.rows
        self.w = [ [SPACE] * self.cols for _ in range(self.rows)]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号