Hi,
Ian Laurenson wrote:
the following script tries to load python into the office and checks, whether this was successful.I am trying to write a "download and install addons and templates" routine for OOo. I would like to test if PyUno has been installed.
I think that I can test if Java has been installed with: oJava = CreateUnoService("com.sun.star.java.JavaVirtualMachine") fnJavaAvailable = oJava.isVMEnabled
Any suggestions for how to test if PyUno is installed?
Bye,
Joerg
Sub Main if hasPythonLoader() then msgbox "Python is installed" else msgbox "Python is not useable in office" end if End sub
function hasPythonLoader() as Boolean
on error goto myErrorHandler
ret = createUnoService("com.sun.star.loader.Python" )
hasPythonLoader() = not isnull( ret )
exit function
myErrorHandler:
resume next
End function
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
