Show More
@@ -170,6 +170,8 b' def termwidth():' | |||
|
170 | 170 | try: |
|
171 | 171 | # Query stderr to avoid problems with redirections |
|
172 | 172 | screenbuf = win32console.GetStdHandle(win32console.STD_ERROR_HANDLE) |
|
173 | if screenbuf is None: | |
|
174 | return 79 | |
|
173 | 175 | try: |
|
174 | 176 | window = screenbuf.GetConsoleScreenBufferInfo()['Window'] |
|
175 | 177 | width = window.Right - window.Left |
General Comments 0
You need to be logged in to leave comments.
Login now