Curses sorely lacking an event loop?

James Stroud jstroud at mbi.ucla.edu
Wed Feb 28 06:15:12 EST 2007


Michael Zawrotny wrote:
> On Tue, 27 Feb 2007 12:27:17 GMT, James Stroud wrote:
>>  Is curses really lacking an event loop? Do I have to write my own? I 
>>  infer from the docs that this is the case. For example, I want the 
>>  screen to be updated with resize but I find myself waiting for getch() 
>>  if I want user input, and so the screen must remain ugly until the user 
>>  presses a key. What am I missing?
> 
> I'm not a curses expert, but I can answer this part.  When the screen
> is resized, SIGWINCH is sent to the process.  You can use the normal
> signal handling apparatus to install a handler that updates the screen
> when that signal arrives.
> 
> 
> Mike
> 

Thank you. This is good to know.

James



More information about the Python-list mailing list