carb::launcher::kInterpreterPythonCommand

Defined in carb/launcher/ILauncher.h

constexpr const char *const carb::launcher::kInterpreterPythonCommand = "python -c"

Interpreter names for python scripts.

Using this command assumes that at least one version of python is installed locally on the system and is available through the system PATH variable. It is the caller’s responsibility to ensure that a global python instance is installed on the calling system before either using this interpreter string in a launch descriptor or attempting to run a python script with a nullptr interpreter.

To check if the global python interpreter is installed on the calling system, a call to ILauncher::launchProcess() with a kInterpreterPythonCommand as the interpreter and the simple script “quit” can be used. If ILauncher::launchProcess() succeeds, the global python interpreter is installed. If it fails, it is not installed. In the latter case, it is the caller’s responsibility to either find or install an appropriate python interpreter before attempting to launch a python script.