Python3Script Xojo Plugin |
|
Python3Script.Init Method
Call this method to initialise the Python engine for your application. This variation takes application name as parameter.
shared Init(
applicationName
as String)
Parameters
- applicationName
- Name of your application.
Remarks
Your application must initialise Python before doing anything else with Python, except Xojo classes to be exposed to Python need to be registered first and also if you want to check if Python installation exists on the machine then that needs to happen first.
It is good idea to check first if Python 3.4.x actually has been installed on the machine which can be done like this:
Sub Open()
If not Python3Script.PythonIsFound() then
MsgBox "Correct Python installation was not found on this machine"
Quit()
else
Python3Script.Init("TestApp")
end if
End Sub
Note difference from our other PythonScript plugin which is for Python 2.7.x:
For Python 3.4.x then classes exposed from Xojo must be registered before the Init method is called while in 2.7.x we registered them after the Init.
See Also
Python3Script Class