PythonExecutor class
A class that handles the execution of Python code.
Constructors
-
PythonExecutor.new({String? pythonExecutablePath, List<
String> additionalPythonPaths = const []}) - Creates a new PythonExecutor instance.
Properties
-
additionalPythonPaths
→ List<
String> -
Additional Python paths to add to PYTHONPATH
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- pythonExecutablePath → String?
-
Path to the Python executable
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
executeCode(
String pythonCode) → Future< PythonResult> - Executes Python code and returns the result.
-
executeFile(
String filePath) → Future< PythonResult> - Executes a Python script file and returns the result.
-
installPackage(
String packageName) → Future< PythonResult> - Installs a Python package using pip.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited