Current Terminal Screen:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
>                 if cursor_r != r+1:
>                     out.append('\r')
>                     dr = r - (cursor_r - 1)
>                     if dr > 0:
>                         out.append('\n' * dr)
>                     else:
>                         out.append(f'\x1b[{-dr}A')
>                 out.append('\x1b[2K')
>                 out.append(curr_row.decode('latin1'))
>                 cursor_r, cursor_c = r+1, w+1
>             else:
>                 # Partial updates
>                 for start, end in runs:
>                     if cursor_r != r+1:
>                         out.append('\r')
>                         dr = r - (cursor_r - 1)
>                         if dr > 0:
>                             out.append('\n' * dr)
>                         else:
>                             out.append(f'\x1b[{-dr}A')
>                         cursor_r = r+1
>                         cursor_c = 1
>                     if cursor_c != start+1:
>                         dc = (start+1) - cursor_c
>                         if dc > 0:
>                             out.append(f'\x1b[{dc}C')
>                         else:
>                             out.append(f'\x1b[{-dc}D')
>                         cursor_c = start+1
>                     out.append(curr_row[start:end+1].decode('latin1'))
>                     cursor_c = end+2
>
>         out.append('\x1e')
>
>     sys.stdout.write(''.join(out))
>
> if __name__ == '__main__':
>     main()
> EOF
root@f3f8d6319494:/app#
