Simulation Modeling Tool Kit
Public Member Functions | Static Public Member Functions | List of all members
smtk::common::PythonInterpreter Class Reference

A singleton class for encapsulating the embedded interpreter. More...

#include <PythonInterpreter.h>

Public Member Functions

bool isInitialized () const
void initialize ()
void finalize ()
std::vector< std::string > pythonPath ()
bool addPathToPluginModule (const std::string &module, const std::string &libdir)
bool addToPythonPath (const std::string &paths, std::string separator=",")
bool canFindModule (const std::string &module) const
bool addPathToPackagedModule (const std::string &libPackageDir, const std::string &module)
bool addPathToInstalledModule (const std::string &libInstallDir, const std::string &module)
bool addPathToBuildTree (const std::string &buildTreePath, const std::string &module)
bool isEmbedded () const
void dontWriteByteCode (bool choice)
bool dontWriteByteCode ()
bool loadPythonSourceFile (const std::string &fileName)
bool loadPythonSourceFile (const std::string &fileName, const std::string &moduleName)

Static Public Member Functions

static PythonInterpreterinstance ()

Detailed Description

A singleton class for encapsulating the embedded interpreter.

Actions that invoke pybind11's embedded interpreter (such as python-based operators) must be be called while the interpreter is initialized. This singleton ensures that the interpreter is initialized/finalized at static initialization/destruction.

NB: This class should not be wrapped.

The documentation for this class was generated from the following files: