[issue2675] Curses terminal resize problems when Python is in interactive mode
poq
report at bugs.python.org
Thu May 17 23:51:38 CEST 2012
poq <poq at gmx.com> added the comment:
Just to confirm: curses SIGWINCH handling is still (2.7/3.2) broken after importing readline.
Readline seems to set the LINES/COLUMNS environment vars, and this confuses curses, even if curses is imported after readline.
Clearing the LINES/COLUMNS vars after import readline fixes the issue:
os.environ['LINES'] = os.environ['COLUMNS'] = ''
or
os.unsetenv('LINES'); os.unsetenv('COLUMNS')
(or other variations).
I spent a couple hours tearing my hair out over this, before I found this report.
It may be possible for Python to work around this readline behavior by saving LINES/COLUMNS and restoring them after initializing readline.
Or maybe this should just be documented somewhere.
----------
nosy: +poq
versions: +Python 3.3 -Python 2.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2675>
_______________________________________
More information about the Python-bugs-list
mailing list