Open 3D Engine EditorPythonBindings Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EditorPythonBindings::PythonSystemComponent Class Reference

#include <PythonSystemComponent.h>

Inherits AZ::Component, AzToolsFramework::EditorPythonEventsInterface, and AzToolsFramework::EditorPythonRunnerRequestBus::Handler.

Public Member Functions

 AZ_COMPONENT (PythonSystemComponent, PythonSystemComponentTypeId, AZ::Component)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 

Protected Member Functions

void Activate () override
 
void Deactivate () override
 
bool StartPython (bool silenceWarnings=false) override
 
bool StopPython (bool silenceWarnings=false) override
 
bool IsPythonActive () override
 
void WaitForInitialization () override
 
void ExecuteWithLock (AZStd::function< void()> executionCallback) override
 
bool TryExecuteWithLock (AZStd::function< void()> executionCallback) override
 
void ExecuteByString (AZStd::string_view script, bool printResult) override
 
bool ExecuteByFilename (AZStd::string_view filename) override
 
bool ExecuteByFilenameWithArgs (AZStd::string_view filename, const AZStd::vector< AZStd::string_view > &args) override
 
bool ExecuteByFilenameAsTest (AZStd::string_view filename, AZStd::string_view testCase, const AZStd::vector< AZStd::string_view > &args) override
 

Detailed Description

Manages the Python interpreter inside this Gem (Editor only)

  • redirects the Python standard output and error streams to AZ_TracePrintf and AZ_Warning, respectively

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