ncurses' Dark Devilry

Jeremy Moles jeremy at emperorlinux.com
Tue Nov 29 13:32:02 EST 2005


I'm working on a project using ncurses w/ Python. As an aside, I
implemented addchstr in the cursesmodule.c file in Python SVN, if anyone
wants me to try and get that made permanent.

AT ANY RATE...

I was wondering--and this is more a general curses question rather than
a Python one, but I know there are some old-timers here who have made
curses obey before--is there a way to "repaint" a portion of screen
without stealing the "cursor?" That is:

I have a focus "wheel" of sorts that allows the user to do input on
various wigets and windows and whatnot. However, if I want to quickly
call addstr somewhere else in the application I have to:

	1. Store the YX coords of the cursor currently
	2. Use the cursor in the "current" action
	3. Restore the old cursor location

I know there are ways around this as I have seen curses apps that, for
example, have a clock that updates every second without stealing
"focus."

I tried implementing/using addchstr (mentioned above) to no success.

Any ideas? Is this just the plain wrong place to ask this? :)




More information about the Python-list mailing list