1 #ifndef MHO_PythonSubprocessRunner_HH__
2 #define MHO_PythonSubprocessRunner_HH__
76 static Result
RunModule(
const std::string& module,
const std::string& request_json);
Pure-C++ (no pybind, no libpython) helper that runs the user's python3 and exchanges JSON with it....
Definition: MHO_PythonSubprocessRunner.hh:37
static std::string ResolveInterpreter()
Resolve the python interpreter to use: $HOPS_PYTHON, else "python3" (left for PATH resolution by the ...
Definition: MHO_PythonSubprocessRunner.cc:18
static Result RunModule(const std::string &module, const std::string &request_json)
Run python -m <module> <request_file> <response_file>, feeding the JSON request_json via a temp file ...
Definition: MHO_PythonSubprocessRunner.cc:172
static std::string ResolvePackageDir()
Install-prefix-relative directory holding the shipped hops_* python packages, resolved at runtime aga...
Definition: MHO_PythonSubprocessRunner.cc:30
Definition: MHO_AdhocFlagging.hh:18
Definition: MHO_PythonSubprocessRunner.hh:40
std::string err
captured stderr (python traceback, if any)
Definition: MHO_PythonSubprocessRunner.hh:45
std::string out
the JSON response (read from the child's response file)
Definition: MHO_PythonSubprocessRunner.hh:44
bool exited
did the child exit normally (vs. signalled)
Definition: MHO_PythonSubprocessRunner.hh:42
bool spawned
did popen() launch a shell/interpreter at all
Definition: MHO_PythonSubprocessRunner.hh:41
bool Success() const
Definition: MHO_PythonSubprocessRunner.hh:48
int exit_code
child exit status when exited == true
Definition: MHO_PythonSubprocessRunner.hh:43