RE: [script] Checking if a scripting langage is available

Date : Wed, 27 Jul 2005 12:41:46 -0400
To : <XSI(at)Softimage.COM>
From : "Jerry Gamache" <jerryg(at)Softimage.COM>
Subject : RE: [script] Checking if a scripting langage is available
Hello Bernard,

the answer in vbscript:

on error resume next
set oPython = CreateObject("Python")
if Err.Number = 0 then
	LogMessage "Python is installed"
end if

and, just in case, in jscript:

bPythonInstalled = true;
try {
	oPython = XSIFactory.CreateObject("Python");
}
catch (e) {
	bPythonInstalled = false;
}
if (bPythonInstalled) {
	LogMessage("Python is installed");
}

Don't expect to do much with that Python object unless you speak OLE automation fluently.

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
Of Bernard Lebel
Posted At: Wednesday, July 27, 2005 11:55 AM
Posted To: xsi
Conversation: [script] Checking if a scripting langage is available
Subject: [script] Checking if a scripting langage is available


Hello,

I have this event, in VBScript, in wich I would like to test if Python
is an available langage in XSI. Is there a way to find out this
information in scripting in VBScript?


Thanks
Bernard

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.