Python3Script Xojo Plugin

Python3XojoModule Class (console safe)

A class to expose Xojo modules to Python 3

Python3Object
   Python3XojoModule

class Python3XojoModule

Constructors

Python3XojoModuleA Constructor that constructs Python3XojoModule from name and method count.

Properties

Name (Inherited) Returns the name of the object.

Methods

AddClassAdds a class to the module.
ModuleCreateProcA function to create a value to return in a ModuleInit handler.
RegisterFunctionRegisters a Xojo function to expose to Python via this module

Examples

Dim xojoModule as Python3XojoModule

If not Python3Script.PythonIsFound() then
    MsgBox "Correct Python installation was not found on this machine"
    Quit()
else
    xojoModule = new Python3XojoModule("Xojo",2)
    xojoModule.RegisterFunction("TestHelloFromXojo",AddressOf XojoFunctionsForPython.TestHelloFromXojo)
    xojoModule.RegisterFunction("CalculateSomething",AddressOf XojoFunctionsForPython.CalculateSomething)
   
    XojoFunctionsForPython.ModuleHandle = xojoModule
   
    Python3Script.RegisterXojoModule(xojoModule, AddressOf XojoFunctionsForPython.ModuleInit)
   
    Python3Script.Init("TestApp")
end if

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