I getting an error when I try to run this function here:
def get_char_out(prompt=None):
while True:
try:
return str(raw_input(prompt + ' '))
break
except ValueError:
print '\nInvaild input'
print get_char_out('String, please')
I keep getting this error here:
String, please Traceback (most recent call last):
File "main.py", line 11, in
get_char_out('String, please')
File "main.py", line 6, in get_char_out
return str(raw_input(prompt + ' '))
EOFError: EOF when reading a line
get_char_out returns the prompt, but then I run into the EOF error. I understand that EOF has something to do with ending input, but this has me a bit stumped.
Thanks in advance!