def _user_thread_main(self, target):
try:<EOL><INDENT>return_code = target()<EOL>if return_code is None:<EOL><INDENT>return_code = <NUM_LIT:0><EOL><DEDENT>AppHelper.callAfter(lambda: sys.exit(return_code))<EOL><DEDENT>except Exception as ex:<EOL><INDENT>AppHelper.callAfter(self._raise_error, sys.exc_info())<EOL><DEDENT>
Main entry point for the thread that will run user's code.