[issue7567] Messed up terminal after calling curses.initscr() twice.
report at bugs.python.org
Sat Jan 30 11:38:36 CET 2010
Sami Zerrade <szerrade at gmail.com> added the comment:
This is being caused by the following 2 new lines in the initscr() function of Lib/curses/__init__.py:
Commenting them out will cause the behavior from version 2.5.
In general, invoking the C curses library's setupterm() function after the C initscr() function has been called will cause the terminal to break the next time that endwin() is called. In this particular case, the first call to the Python initscr() function provides the call to the C initscr() and the second call to Python's initscr() provides the call to setupterm(). The bug can be fixed by having the Python initscr() function in __init__.py make sure that initscr hasn't been called before making the call to setupterm().
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list