I am wanting to write a function to ask the user input using Python curses. The problem I am having is I want to have the cursor hidden in other parts of the program except in the text-box. I intend to use this function in many cases and if the cursor is hidden before the function call, it should be returned to that state and vise versa. To do this I need to be able to read the state of the cursor. How do I do this? (Something like this?)
if curses.get_cursor_state() == 0:
#Hidden
hidden=True
else:
hidden=False
#Textbox code here
if hidden:
curs_set(0)
else:
curs_set(1)