PythonScript Xojo Plugin |

# PythonScript Class (console safe)

A class that encapsulates the Python script engine. You should not create instance of this class. Its a singleton class and all its functions are static and can be called without instance.

Object
PythonScript

class PythonScript

#### Methods

shared AddSearchPath | Adds search path for where Python will load custom modules from.
shared ClearError | Clears the error indicator, making ErrorOccurred return false again.
shared ErrorOccurred | Returns true if error has occurred, else false.
shared Finalize | Call this method to clean up resources that the Python engine used. Your application should normally call this when it shuts down if it has used Python.
shared GetError | Gets the error message if the ErrorOccurred property indicates there was a error.
shared GetModule | Gets a python module, looking for it at Pythons default path and custom paths.
shared Init | Call this method to initialise the Python engine for your application. This variation takes application name as parameter. Your application must initialise Python before doing anything else with Python.
shared Init | Call this method to initialise the Python engine for your application. This variation takes no parameter. Your application must initialise Python before doing anything else with Python.
shared PythonIsFound | Checks if valid Python installation is found.
shared RegisterXojoModule | Registers a Xojo module to expose to python.
shared SetConsoleOutput | Use this method to register a redirect of console output from Python scripts.
shared SetError | Use this method to raise a error.

#### Constants

PY_NO_ERROR = 0 |
PY_ERROR_COULD_NOT_CONVERT = 1 |
PY_ERROR_INDEX_OUT_OF_BOUNDS = 2 |
PY_NIL_PARAM_ERROR = 3 |

#### Supported Platforms:

- MacOS X Cocoa 32 bit
- MacOS X Cocoa 64 bit
- Windows 32 bit
- Windows 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM