[Tutor] help with .get in Tkinter
alan.gauld at freenet.co.uk
Sun Feb 20 19:09:06 CET 2005
There are two problems here:
> from Tkinter import *
> def go():...
This is OK but...
This will store None in b because pack() always returns None.
> For some reason the function is called before I click the button,
> I get .10037088 before I have done a thing.
Thats because you are calling go() inside the widget specification,
you need to pass a reference to the function instead - ie miss out
That should fix it.
Author of the Learn to Program web tutor
More information about the Tutor