【问题标题】:Sublime text 2 error: When building gameSublime text 2错误:构建游戏时
【发布时间】:2013-01-21 01:31:45
【问题描述】:

我不断收到此错误

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 游戏时。有人可以帮忙吗?!

井字游戏代码来自http://inventwithpython.com/tictactoe.py

注意:我尝试安装和配置 sublimerepl 并没有解决问题。

【问题讨论】:

  • 请原谅我的格式我是菜鸟。块引用部分是我得到的消息。减去所有在此处输入代码的消息。

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


【解决方案1】:

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

Sublime 环境不够用。

【讨论】:

    猜你喜欢
    • 2013-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多