(self, keys)
Return True if Tcl accepts the new keys else show message.
Return True if Tcl accepts the new keys else show message.
Return True if Tcl accepts the new keys else show message .
def bind_ok(self, keys):
        "Return True if Tcl accepts the new keys else show message."
        try:
            binding = self.bind(keys, lambda: None)
        except TclError as err:
            self.showerror(
                    title=self.keyerror_title, parent=self,
                    message=(f'The entered key sequence is not accepted.\n\n'
                             f'Error: {err}'))
            return False
        else:
            self.unbind(keys, binding)
            return True
def bind_ok ( self , keys ) : try : binding = self . bind ( keys , lambda : None ) except TclError as err : self . showerror ( title = self . keyerror_title , parent = self , message = ( f'The entered key sequence is not accepted.\n\n' f'Error: {err}' ) ) return False else : self . unbind ( keys , binding ) return True