[英]Python 3.1 and Sublime Text 2 error
我想使用SublimeText2作为IDE在Python中开发应用程序。
我有以下问题:
当我制作一个新文件时,将其另存为python并执行Tools-> Build System-> Python CTRL + B
我收到此错误:
Please type your name and press enter: Traceback (most recent call last):
File "/Users/strielok/Desktop/hello.py", line 1, in <module>
personsname = raw_input("Please type your name and press enter: ")
EOFError: EOF when reading a line
[Finished]
这是程序的代码:
personsname = raw_input("Please type your name and press enter: ")
print "Hello " +personsname
但是,当我从终端(我在Mac上)运行此代码时,它可以完美运行。
知道可能是什么问题吗?
安装sublimeREPL,然后选择Tools->sublimerepl->python
。
来自Sublime Text的论坛,看来stdin不会与任何东西连接,因此可以预期。
来源: http : //www.sublimetext.com/forum/viewtopic.php? f=3& t= 1519& p= 6908& hilit=python+input#wrap
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.