Open 3D Engine AzToolsFramework API Reference 26.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::EmbeddedPython::PythonLoader Class Reference

Public Types

using EggLinkPathVisitor = AZStd::function< void(AZ::IO::PathView)>
 

Static Public Member Functions

static AZ::IO::FixedMaxPath GetPythonHomePath (AZ::IO::PathView engineRoot, const char *overridePythonBaseVenvPath=nullptr)
 
static void ReadPythonEggLinkPaths (AZ::IO::PathView engineRoot, EggLinkPathVisitor eggLinkPathVisitor, const char *overridePythonBaseVenvPath=nullptr)
 
static AZ::IO::FixedMaxPath GetPythonVenvPath (AZ::IO::PathView engineRoot, const char *overridePythonBaseVenvPath=nullptr)
 
static AZ::IO::FixedMaxPath GetPythonExecutablePath (AZ::IO::PathView engineRoot, const char *overridePythonBaseVenvPath=nullptr)
 

Member Typedef Documentation

◆ EggLinkPathVisitor

using AzToolsFramework::EmbeddedPython::PythonLoader::EggLinkPathVisitor = AZStd::function<void(AZ::IO::PathView)>

Collect the paths from all the egg-link files found in the python home paths used by the engine

Parameters
engineRootThe path to the engine root to locate the python home
eggLinkPathVisitorThe callback visitor function to receive the egg-link paths that are discovered
overridePythonBaseVenvPathIf set, the path override the base python venv folder

Member Function Documentation

◆ GetPythonExecutablePath()

static AZ::IO::FixedMaxPath AzToolsFramework::EmbeddedPython::PythonLoader::GetPythonExecutablePath ( AZ::IO::PathView  engineRoot,
const char *  overridePythonBaseVenvPath = nullptr 
)
static

Calculate the path to the where the python executable resides in. Note that this is not always the same path as the python home path

Parameters
engineRootThe path to the engine root to
overridePythonBaseVenvPathIf set, the path override the base python venv folder locate the python executable path
Returns
The path of the python venv path

◆ GetPythonHomePath()

static AZ::IO::FixedMaxPath AzToolsFramework::EmbeddedPython::PythonLoader::GetPythonHomePath ( AZ::IO::PathView  engineRoot,
const char *  overridePythonBaseVenvPath = nullptr 
)
static

Calculate the python home (PYTHONHOME) based on the engine root

Parameters
engineRootThe path to the engine root to locate the python home
overridePythonBaseVenvPathIf set, the path override the base python venv folder
Returns
The path of the python home path

◆ GetPythonVenvPath()

static AZ::IO::FixedMaxPath AzToolsFramework::EmbeddedPython::PythonLoader::GetPythonVenvPath ( AZ::IO::PathView  engineRoot,
const char *  overridePythonBaseVenvPath = nullptr 
)
static

Calculate the path to the engine's python virtual environment used for python home (PYTHONHOME) based on the engine root

Parameters
engineRootThe path to the engine root to locate the python venv path
overridePythonBaseVenvPathIf set, the path override the base python venv folder
Returns
The path of the python venv path

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