def error(self, string): callback = lambda : self.error_callback(string) sublime.set_timeout(callback, 1)