ncurses and thread problems

Mikael Jansson tic at dtek.chalmers.se
Fri Apr 18 15:42:18 EDT 2003


Hi there,

I have some code where I put my window's loop for retrieving user input
via a getch() loop in a thread, so I can go on doing other things in the
mean time.

Now, the problem is that for /some/ reason, I don't get the ESC-sequence
mangling from getch() if I call it within a thread, which I /do/ get if I
have no other thread than the main application. I.e.: I have to check for
27, [ and A to get KEY_UP, instead of checking against KEY_UP directly.

I tried setting various values for ESCDELAY (500,1000,2000,10000), but
still no go.

Why's that?


I'm using Python-2.2.2 on Debian GNU/Linux-3.0 and BeOS R5/BONE.



Thanks in advance,
-- Mikael J.






More information about the Python-list mailing list