Python3Script Xojo Plugin

Python3Script.Finalize Method

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 Finalize()



Its good to call PythonScript.Init in your App.Open event and PythonScript.Finalize in your App.Close event.

If you are quitting your application from the Open event if Python is not found on the machine then you need a if block to make sure you do not call Python3Script.Finalize if no Python was found on the machine, like:

Sub Close()
    If Python3Script.PythonIsFound() then
    end if
End Sub

See Also

Python3Script Class