Added Category-awareness to the python tkinter code.