N/APosted on - 05/29/2015
I am getting multiple errors and all in Tkinter basically. I am a newbie in this and have no clues what are these errors. Hence i started on reading on Tkinter first. The error messages starts with “Exception in Tkinter call-back” and pops so many errors which i do not know about. What is Tkinter function? How to use that function? How to avoid errors in Tkinter function? I am creating a project for learning colours for children using python. Thank you for your great help.
How to resolve Tkinter errors in Python
The Tkinter module is the short term for “Tk interface”. It is a standard Python interface to the Tk GUI toolkit. Both Tkinter and Tk are accessible on the majority of UNIX platforms including Microsoft Windows systems. In Python 3, Tkinter has been renamed to tkinter. Tkinter was written by Fredrik Lundh. See the example below.
from Tkinter import *
print "hi there, everyone!"
self.QUIT = Button(self)
self.QUIT["text"] = "QUIT"
self.QUIT["fg"] = "red"
self.QUIT["command"] = self.quit
self.hi_there = Button(self)
self.hi_there["text"] = "Hello",
self.hi_there["command"] = self.say_hi
def __init__(self, master=None):
root = Tk()
app = Application(master=root)
The above example is a simple hello world program. It will display the message “hi there, everyone!”