Sublime text 2 error:构建游戏时

时间:2013-02-05 23:49:04

标签: python pygame sublimetext2 building tic-tac-toe

我一直收到此错误

Welcome to Tic Tac Toe
Do you want to be X or O?
Traceback (most recent call last):
  File "C:\Python27\last try.py", line 145, in <module>
    playerLetter, computerLetter = inputPlayerLetter()
  File "C:\Python27\last try.py", line 27, in inputPlayerLetter
    letter = input().upper()
EOFError: EOF when reading a line
Finished in 0.2s with exit code 1

当我把代码放入python tic tac toe游戏时。有人可以帮忙吗?!

tic tac toe游戏的代码来自http://inventwithpython.com/tictactoe.py

note :我尝试安装和配置sublimerepl,但它无法解决问题。

1 个答案:

答案 0 :(得分:1)

您需要在终端中运行代码,因为input()函数要求您输入一些文本。

Sublime环境还不够。