Consider the following code.
import curses
import rlcompleter
def main(stdscr):
while 1:
c = stdscr.get_wch()
curses.wrapper(main)
When I run this and resize my terminal, the program fails at the get_wch
, saying
Traceback (most recent call last):
File "foo.py", line 8, in <module>
curses.wrapper(main)
File "/usr/lib/python3.3/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "foo.py", line 6, in main
c = stdscr.get_wch()
_curses.error: no input
However, when I remove the line import rlcompleter
, a KEY_RESIZE
is correctly returned and everything works fine.
What is going on??