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