Sublime text 2 错误:构建游戏时 [英] Sublime text 2 error: When building game

查看:47
本文介绍了Sublime text 2 错误:构建游戏时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直收到这个错误

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

When I put in the code to a python tic tac toe game. Can some one please help?!

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

注意:我尝试安装和配置 sublimerepl,但没有解决问题.

note: I tried installing and configuring sublimerepl and it doesn't solve the problem.

推荐答案

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

You need to run the code in a terminal, because the input() function is asking you to enter some text.

Sublime 环境还不够.

The Sublime environment is not sufficient.

这篇关于Sublime text 2 错误:构建游戏时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆