def get_region(self, rs,cs, re,ce):
        rs = rs % self.rows
        re = re % self.rows
        cs = cs % self.cols
        ce = ce % self.cols
        if rs > re:
            rs, re = re, rs
        if cs > ce:
            cs, ce = ce, cs
        sc = []
        for r in range(rs, re+1):
            line = ''.join(map(lambda t: apply(decode, t), self.buf[r][cs:ce+1]))
            sc.append(line)
        return sc
This returns a list of lines representing the region.
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/terminal.py/Screen.get_region