Show More
@@ -316,7 +316,9 b' def termwidth():' | |||||
316 | if not os.isatty(fd): |
|
316 | if not os.isatty(fd): | |
317 | continue |
|
317 | continue | |
318 | arri = fcntl.ioctl(fd, termios.TIOCGWINSZ, '\0' * 8) |
|
318 | arri = fcntl.ioctl(fd, termios.TIOCGWINSZ, '\0' * 8) | |
319 |
|
|
319 | width = array.array('h', arri)[1] | |
|
320 | if width > 0: | |||
|
321 | return width | |||
320 | except ValueError: |
|
322 | except ValueError: | |
321 | pass |
|
323 | pass | |
322 | except IOError, e: |
|
324 | except IOError, e: |
General Comments 0
You need to be logged in to leave comments.
Login now