(self)
return (24, 80)
Get guest operating system terminal size
Get guest operating system terminal size
Get guest operating system terminal size
def termsize(self):
        """Get guest operating system terminal size"""
        try:
            with open("/dev/tty") as tty:
                cmd = ['stty', 'size']
                lines, cols = Uprocess().check_output(cmd, stdin=tty).split()
                return (int(lines), int(cols))
        except (OSError, IOError):
            pass
        return (24, 80)
def termsize ( self ) : try : with open ( "/dev/tty" ) as tty : cmd = [ 'stty' , 'size' ] lines , cols = Uprocess ( ) . check_output ( cmd , stdin = tty ) . split ( ) return ( int ( lines ) , int ( cols ) ) except ( OSError , IOError ) : pass return ( 24 , 80 )