python - raw_input 的 EOF 错误

标签 python python-2.7 qpython

我正在使用 qpython,当我正在使用 raw_input 函数时,我遇到了一个 EOF 错误,例如 -

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

我得到了这个结果 -

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

有什么问题????

最佳答案

根据 Why is raw_input() missing? Any other alternatives?来自 QPython 论坛:

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.

关于python - raw_input 的 EOF 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19462876/

相关文章:

android - 使用mac或windows的QPython开发环境

python - communicate() 和 .stdin.write、.stdout.read 或 .stderr.read 之间的区别 - python

python - 如何解决 ImportError "No module named pycurl"

Python 从文件中提取数据

python-3.x - 使用 lambda 函数修改以下内容并将 python2 代码过滤为 python 3

qpython无法下载请求模块

python - 从具有重复元素的列表中获取所有可能的组合?

python - 如何访问作为输入工件传递到 argo 工作流程中的脚本模板的文件内容

python - Pandas 分组计数和比例