Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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