[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Restarting Curses
From: |
Nicholas Cole |
Subject: |
Restarting Curses |
Date: |
Thu, 3 Sep 2009 15:30:29 -0400 |
Dear Curses List,
I have a strange problem. I have code that can start up and close
down curses making sure the terminal is reset. But if I call it a
second time, the terminal is not properly reset. I'm using python,
but I suspect it would be the same in C. What might I be doing wrong?
Python curses provides a wrapper function precisely for the purpose of
setting up the terminal and then resetting it, and the same behaviour
happens whether I use that or set up curses myself.
Minimal code looks something like:
#def wrapper(call_function):
# locale.setlocale(locale.LC_ALL, '')
# screen = curses.initscr()
# curses.noecho()
# curses.cbreak()
#
# return_code = call_function(screen)
#
# curses.nocbreak()
# curses.echo()
# curses.endwin()
As I say, it seems to work the first time it is called, but not the
second. Any insights?
Best wishes,
N
- Restarting Curses,
Nicholas Cole <=
- Re: Restarting Curses, Tim Mooney, 2009/09/03
- Re: Restarting Curses, Nicholas Cole, 2009/09/03
- Re: Restarting Curses, Thomas Dickey, 2009/09/03
- Re: Restarting Curses, Tim Mooney, 2009/09/03
- Re: Restarting Curses, Nicholas Cole, 2009/09/05
- Re: Restarting Curses, Thomas Dickey, 2009/09/05
- Re: Restarting Curses, Nicholas Cole, 2009/09/05
- Re: Restarting Curses, Nicholas Cole, 2009/09/05