[Tutor] Why is it not working?

boB Stepp robertvstepp at gmail.com
Thu Feb 5 04:51:15 CET 2015


On Wed, Feb 4, 2015 at 6:12 PM, Antonio Zagheni
<zagheni at yahoo.com.dmarc.invalid> wrote:
> Hi there,
>
> I am a begginer in python and I'm trying to learn something about Tkinter.
>
> I did a game (the code is below) using Tkinter were two players have to fill a row, a column or a diagonal with either 'X' or 'O'.
> When it happens, the code was supposed to recognize the winner ('Jogador 1 or 2 vence!' --> translating from portuguese means 'player 1 or 2 wins!').
>
> The problem is that sometimes the code doesn't recognize the winner and I can't find the problem.
>
> I don't have any error message.
>
> I belive that the problem is related with the fact that after clicking a button it calls a function an inside that function another function is called (analise()), but I am not sure...
>
> If somebody could take a look and give me some tips to solve the problem I will apreciate a lot.
>
> The problem occurs either using Windows 7 or Ubuntu 14.04 in a 64 bit computer, both running idle with python's version 2.7.7.

It has been mentioned here in the past that one should not run a
program using Tkinter from within IDLE as IDLE itself is implemented
using Tkinter. Just to eliminate one other variable from your
troubleshooting you might ensure you start your program from the
command line and not from within IDLE.

boB


More information about the Tutor mailing list