Closed GoogleCodeExporter closed 9 years ago
This is an interesting bug. It seems the terminal fails to report width and
height.
It works great under Windows 7 (and previous versions); but reading up on it it
seems things have changed slightly in Windows 8 and people use yet another
method to get the terminal size.
I will look into it shortly.
/Adam Waldenberg
Original comment by gitinspe...@ejwa.se
on 22 Jul 2013 at 2:37
I don't have a Windows 8 installation; so you will have to assist me a little.
Reading around there seems to be a method used in conjunction with tput. Could
you check if the tput command is available in your terminal in Windows 8? In
that case, that command could be used to fetch the terminal size, executing the
commands;
tput cols
tput lines
... should return the number of columns and lines of the current terminal.
/Adam Waldenberg
Original comment by gitinspe...@ejwa.se
on 22 Jul 2013 at 1:06
Unfortunately, neither of them works in PowerShell or cmd prompt
PS C:\Users\ZhijieWang> tput cols
tput : The term 'tput' is not recognized as the name of a cmdlet, function,
script file, or operable program. Che
the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ tput cols
+ ~~~~
+ CategoryInfo : ObjectNotFound: (tput:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\ZhijieWang> tput lines
tput : The term 'tput' is not recognized as the name of a cmdlet, function,
script file, or operable pro
the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ tput lines
+ ~~~~
+ CategoryInfo : ObjectNotFound: (tput:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\ZhijieWang>
Original comment by wangzhij...@gmail.com
on 22 Jul 2013 at 2:26
This issue was closed by revision 9b5e82bc2cdf.
Original comment by gitinspe...@ejwa.se
on 22 Jul 2013 at 11:10
The terminal now falls back to default size (80*25) if the size of the terminal
could not be determined. See the revision above for more information.
This is the correct behavior anyway (even if it shouldn't fail). Reading up on
it the current method *SHOULD* work under Windows 8 as well. Something in your
environment probably makes it fail. Maybe some missing modules in the Python
installation? I will add some error printouts to stderr; when the terminal size
can't be determined for some reason, so that it is easier to do something about
it.
/Adam Waldenberg
Original comment by gitinspe...@ejwa.se
on 22 Jul 2013 at 11:16
Original issue reported on code.google.com by
wangzhij...@gmail.com
on 22 Jul 2013 at 1:49