def METHOD_NAME(self, event):
    """Handles the user entering input data in the edit control."""
    locals = self._shell.interpreter().locals
    base_locals = self._base_locals
    if base_locals is None:
        object = self.object
        for name in object.trait_names():
            if name in locals:
                try:
                    setattr(object, name, locals[name])
                except:
                    pass
    else:
        dic = self.value
        for name in locals.keys():
            if name not in base_locals:
                try:
                    dic[name] = locals[name]
                except:
                    pass
    self.command_executed = True