You can bind to an event instead of using .trace (in python 3.x, not tested in 2.x).
The following is copied verbatum from the accepted answer (by "bevdet") to
https://bytes.com/topic/python/answers/897918-how-do-i-make-tkinter-text-entry-all-uppercase.
You can bind an event to your widget that calls a function to convert the text to upper case.
You will need to initialize a textvariable for the Entry widget. In your case, there is nothing else to take the focus, otherwise you could bind < FocusOut > to the widget. < KeyRelease > works nicely however.
from Tkinter import *
win = Tk()
def caps(event):
v.set(v.get().upper())
Label(win, text='Enter user nick:').pack(side=LEFT)
v = StringVar()
w = Entry(win, width=20, textvariable=v)
w.pack(side=LEFT)
w.bind("<KeyRelease>", caps)
mainloop()
I was able to use this method in combination with custom validation (See B. Oakley answer to
Interactively validating Entry widget content in tkinter) by placing the binding OUTSIDE the validation function, immediately after creating the Entry widget. Important: Do not put the binding inside the validation function, doing so will break the validation function (see accepted answer to Python tkInter Entry fun for explanation and a possible workaround).