Class ScriptEngine
public class ScriptEngine
- Inheritance
-
ScriptEngine
Constructors
Fields
Properties
- PythonDllFullName
Gets or sets the full path to the Python DLL file. It includes directory, DLL name and extension.
- PythonExePath
Gets or sets the path to the Python executable.
- PythonVersion
Gets the version of the Python runtime.
Methods
- GetInstalledPackages()
Retrieves a list of installed Python packages in the current environment. This function uses 'importlib.metadata' and operates on third-party distribution packages installed into Python 'site-packages' directory.
- RegisterEncoder(IPyObjectEncoder)
Registers specified encoder (marshaller) from Net object to Python object.
- SetNoSiteFlag()
Set the NoSiteFlag to disable loading the site module. Must be called before initialization.
- SetVirtualEnvironment(string)
Configures the Python runtime to use a specified virtual environment. This method modifies the Python system path and prefix to point to the provided virtual environment directory, ensuring that the Python runtime uses the packages and settings from the virtual environment.