Search code examples
pythonpython-2.7qpython

EOF error with raw_input


I'm using qpython and when I'm using raw_input function I'm getting an EOF error, for example -

print " what's ur name",
a = raw_input()
print " hello %r"%a

and I'm getting this result -

what's ur name ?
Traceback (most recent call last):
File "main.py", line 2, in 
  a= raw_input()
EOFError: EOF when reading a line

What's the problem ????


Solution

  • According to Why is raw_input() missing? Any other alternatives? from QPython forum:

    The raw_input function does not work because there is no console mode like the pc in QPython+. But there is another methord to get users input, you can do Kivy programming, it offer the UI support, and you can get user input by using it's dialog or other input method.