Python 3.1 和 Sublime Text 2 错误 [英] Python 3.1 and Sublime Text 2 error
本文介绍了Python 3.1 和 Sublime Text 2 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用 SublimeText2 作为 IDE 来开发 Python 应用程序.
I want to use a SublimeText2 as IDE for developing applications in Python.
我有以下问题:
当我创建一个新文件时,将其另存为 python 并执行 Tools -> Build System -> PythonCTRL + B
When I make a new file, save it as a python and do 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 上)运行此代码时,它运行良好.
However when I run this code from terminal (I am on Mac), it works perfectly.
知道可能是什么问题吗?
Any idea what the problem might be ?
推荐答案
安装sublimeREPL,然后选择Tools->sublimerepl->python
.
Install sublimeREPL and then choose Tools->sublimerepl->python
.
参考:http://gimo.me/sublime-text2-skills/
这篇关于Python 3.1 和 Sublime Text 2 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文