@property<EOL><INDENT>def size(self):<DEDENT>
for fd in range(<NUM_LIT:3>):<EOL><INDENT>cr = self._ioctl_GWINSZ(fd)<EOL>if cr:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if not cr:<EOL><INDENT>try:<EOL><INDENT>fd = os.open(os.ctermid(), os.O_RDONLY)<EOL>cr = self._ioctl_GWINSZ(fd)<EOL>os.close(fd)<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if not cr:<EOL><INDENT>env = os.environ<EOL>cr = (env.get('<STR_LIT>', <NUM_LIT>), env.get('<STR_LIT>', <NUM_LIT>))<EOL><DEDENT>return int(cr[<NUM_LIT:1>]), int(cr[<NUM_LIT:0>])<EOL>
Get the current terminal size.