I am using raw_input()
like this:
while True:
print "MC ID (CTRL-D = done, 0 = sets, ? = lookup):",
try:
mcid=raw_input()
except:
print
break
# evaluate user input
# ...
Now if you type something, e.g. abc
and hit backspace to correct something, as soon as you remove the a
, the output from print
is erased as well (and the cursor jumps to the beginning of the line), so that you no longer see the input prompt. Is there a way to avoid this?
Try this:
mcid = raw_input("MC ID (CTRL-D = done, 0 = sets, ? = lookup): ")