[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Uh, sorry for the noise. I see now that shutil was already patched by Victor and you in #26801, so that it already works with IDLE started from an icon. So now I don't understand your last comment, "Patching shutil will help for pandas."

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is better to open a new issue for a new feature. The bug reported in this issue two years ago already is fixed. -- ___ Python tracker

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am preparing a PR for shutil.get_window_size. Pyplot should probably call that instead of the os version. -- ___ Python tracker

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patching shutil will help for pandas. -- ___ Python tracker ___

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do you want to do Terry? -- ___ Python tracker ___

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: If one starts IDLE from a command-line console (python -m idlelib) or Python console (import idlelib.idle), sys.__stdout__ is the TextIOWraper for that console and .fileno() returns 1. .get_terminal_size() will then return the console

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue already is fixed in 3.5 (see issue26801). The Stackoverflow question is related to 3.4 which is too old for getting this fix. I'm wondering if it is worth to patch shutil.get_terminal_size() in IDLE so that it will

[issue24920] shutil.get_terminal_size throws AttributeError

2017-10-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: If one starts IDLE from a command-line console (python -m idlelib) or Python console (import idlelib.idle), sys.__stdout__ is the TextIOWraper for that console and .fileno() returns 1. .get_terminal_size() will then return the console

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-26 Thread R. David Murray
R. David Murray added the comment: I think checking for None would be better. Catching Exception might mask other errors that the user would want to know about. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-25 Thread Isaac Levy
Isaac Levy added the comment: I guess users need to check standard streams for None. There's not many uses of stream attributes in core libs. Maybe catch should be Exception -- since it's documented to return a fallback on error. -- ___ Python

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-23 Thread eryksun
eryksun added the comment: FYI, the size of the terminal associated with the C's stdout isn't related to the IDLE shell. For example, in Linux when I run IDLE from the GUI, the associated terminal size is 0x0. On Windows, os.get_terminal_size uses the console API GetConsoleScreenBufferInfo.

[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-23 Thread Isaac Levy
New submission from Isaac Levy: OS: windows 7, python 3.4.3, tk version 8.6.1 os.get_terminal_size also fails. shutil.get_terminal_size() Traceback (most recent call last): File pyshell#4, line 1, in module shutil.get_terminal_size() File C:\Python34\lib\shutil.py, line 1058, in