def questionloop(stdscr):
    stdscr.addstr('Question: ')
curses.echo()
while 1:
    answer = stdscr.getstr()
curses.flushinp()
stdscr.clear()
stdscr.addstr('This is correct!')
doit = stdscr.getch()
if doit == ord('x'):
    stdscr.addstr('Exiting!\n')
break
curses.wrapper(questionloop)
How to print over raw_input's line in Python?