PythonScript Xojo Plugin

PythonScript.PythonIsFound Method

Checks if valid Python installation is found.

shared PythonIsFound() as Boolean

Parameters

Returns

Boolean
True if valid Python 2.7.x installation was found, else false.

Remarks

Version 2.7.x is needed for this plugin. If you want for 3.4.x then please check our other Python3Script plugin.

Its good practice to for example put check like this in your Application.Open event, like for example:

Sub Open()
    If not PythonScript.PythonIsFound() then
       MsgBox "Correct Python installation was not found on this machine"
       Quit()
    else
       PythonScript.Init("TestApp")
    end if
End Sub


And then your close event would look like this:

Sub Close()
    If PythonScript.PythonIsFound() then
       PythonScript.Finalize()
    end if
End Sub

See Also

PythonScript Class