MCPcopy Create free account
hub / github.com/mhammond/pywin32 / Python_run_command_with_log

Function Python_run_command_with_log

Pythonwin/win32uimodule.cpp:576–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576int Python_run_command_with_log(const char *command)
577{
578 PyObject *m, *d, *v;
579 m = PyImport_AddModule("__main__");
580 if (m == NULL)
581 return -1;
582 d = PyModule_GetDict(m);
583 v = PyRun_String(command, file_input, d, d);
584 if (v == NULL) {
585 ExceptionHandler(EHA_DISPLAY_DIALOG);
586 return 1; // indicate failure, with traceback correctly shown.
587 }
588 DODECREF(v);
589 return 0;
590}
591
592void Python_set_error(const char *msg)
593{

Callers 1

Win32uiApplicationInitFunction · 0.85

Calls 1

ExceptionHandlerFunction · 0.85

Tested by

no test coverage detected