1 #ifndef MHO_PythonSubprocessRunner_HH__
2 #define MHO_PythonSubprocessRunner_HH__
71 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:33
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>, 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:36
std::string err
captured stderr (python traceback, if any)
Definition: MHO_PythonSubprocessRunner.hh:41
std::string out
captured stdout (the JSON response)
Definition: MHO_PythonSubprocessRunner.hh:40
bool exited
did the child exit normally (vs. signalled)
Definition: MHO_PythonSubprocessRunner.hh:38
bool spawned
did popen() launch a shell/interpreter at all
Definition: MHO_PythonSubprocessRunner.hh:37
bool Success() const
Definition: MHO_PythonSubprocessRunner.hh:44
int exit_code
child exit status when exited == true
Definition: MHO_PythonSubprocessRunner.hh:39