简体   繁体   中英

Sublime text 2 error: When building game

I keep getting this error

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

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

The code for the tic tac toe game is from http://inventwithpython.com/tictactoe.py

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

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

The Sublime environment is not sufficient.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM