Python3Script Xojo Plugin |
|
Python3Module Class (console safe)
A class that represents a Python 3 module.
Python3Object
Python3Module
class Python3Module
Properties
Name (Inherited) | Returns the name of the object. |
Methods
BooleanField | Gets or sets a boolean field on the module |
DeleteAttribute | Deletes attribute from the Python module. |
DoubleField | Gets or sets a double field on the module |
GetClass | Gets a class declaration by name from the module |
GetFunction | Gets a function by name from to execute from the class module. |
HasAttribute | Checks if the module has attribute with a given name |
Int32Field | Gets or sets a Int32 field on the module |
Int64Field | Gets or sets a Int64 field on the module |
ObjectField | Gets or sets a object field on the module. Object field here means that Xojo or Real Studio object gets stored in a Python script |
Reload | Reloads same module again if it has changed for example. Python caches the modules so loading it again in same way as the first time would not work. |
StringField | Gets or sets a string field on the module |
UInt64Field | Gets or sets a UInt64 field on the module |
Examples
You can get instances of this class by calling Python3Script.GetModule
Python3Script.AddSearchPath(f)
package = Python3Script.GetModule("OurModule")
if package <> nil then
// OurModule loaded
else
// OurModule did not load
end if
Supported Platforms:
MacOS X Cocoa 32 bitMacOS X Cocoa 64 bitWindows 32 bitWindows 64 bitLinux 32 bitLinux 64 bitLinux ARM