Show More
@@ -316,7 +316,9 b' def termwidth():' | |||
|
316 | 316 | if not os.isatty(fd): |
|
317 | 317 | continue |
|
318 | 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 | 322 | except ValueError: |
|
321 | 323 | pass |
|
322 | 324 | except IOError, e: |
General Comments 0
You need to be logged in to leave comments.
Login now