This is because you have to set the focus on the frame to respond to the event:
frame = Frame(master,width = 100,height = 100)
frame.focus_set()
By the way, callbacks receive a Tkinter event as an argument, so ret
should be defined as def ret(self, event)
, or bind the event with a lambda function and don't use the argument:
frame.bind('<Return>', lambda e: self.ret())