Sublime Text 3中的Python输入EOF错误

时间:2016-03-15 18:46:37

标签: python sublimetext3

我一直在尝试使用以下代码从python中获取用户的输入:

workingDir = " "
def specifyDir():
    #workingDir = raw_input("Enter Working Dir")
    workingDir = input("Enter Working Dir")
specifyDir()

我收到此错误:

Traceback (most recent call last):
  File "/Users/akrapf/Desktop/Misc/Programming/Python/Catalog/catalog.py", line 14, in <module>
    specifyDir()
  File "/Users/akrapf/Desktop/Misc/Programming/Python/Catalog/catalog.py", line 11, in specifyDir
    workingDir = input()
EOFError: EOF when reading a line
[Finished in 0.0s with exit code 1]
[shell_cmd: python -u "/Users/akrapf/Desktop/Misc/Programming/Python/Catalog/catalog.py"]

我已经尝试过对此进行研究,我发现有多人说使用SublimeREPL来解决这个问题。我安装了这个并再次尝试没有运气。 raw_input()input()都无效。

0 个答案:

没有答案