我想使用sublimitext2作为IDE来开发Python中的应用程序。
我有以下问题:
创建新文件时,请将其另存为python并使用工具->;构建系统->;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上),它工作得很好。
知道有什么问题吗?
取自Sublime Text的论坛,似乎stdin与任何事情都没有联系,这是意料之中的。
来源:http://www.sublimetext.com/forum/viewtopic.php?f=3&t=1519&p=6908&hilit=python+input#wrap
我已经写了a plugin,它允许在崇高的文本中构建接受输入。边缘有点粗糙,但在我的机器上能用。
安装sublimeREPL,然后选择
Tools->sublimerepl->python
。引用:http://gimo.me/sublime-text2-skills/
相关问题 更多 >
编程相关推荐