Ejemplo n.º 1
0
 def _get_height(self):
     if self._tty:
         packed = fcntl.ioctl(self._tty, termios.TIOCGWINSZ, 'xxxx')
         height = struct.unpack('@HH', packed)[0]
     else:
         height = 25
     return height
Ejemplo n.º 2
0
 def _get_height(self):
     if self._tty:
         packed = fcntl.ioctl(self._tty, termios.TIOCGWINSZ, 'xxxx')
         height = struct.unpack('@HH', packed)[0]
     else:
         height = 25
     return height
Ejemplo n.º 3
0
 def _get_width(self):
     if self._tty:
         packed = fcntl.ioctl(self._tty, termios.TIOCGWINSZ, 'xxxx')
         width = struct.unpack('@HH', packed)[1]
     else:
         width = 80
     return width
Ejemplo n.º 4
0
 def _get_width(self):
     if self._tty:
         packed = fcntl.ioctl(self._tty, termios.TIOCGWINSZ, 'xxxx')
         width = struct.unpack('@HH', packed)[1]
     else:
         width = 80
     return width