I am trying to take one character from the stdin using this function and raw_input will not end the prompt after I hit enter. I can hit enter as many times as I'd like and it will not move onto the next line.
def userInput():
print "What would you like to do?"
while True:
u_Input = raw_input(':')
if len(u_Input) == 1:
break
print 'Please enter only one character'
return u_Input
I also took this code from this question.
I'm using python 2.7.12 on Ubuntu 16.04.