Hello,
Has anyone found an elegant and/or reliable way of know in what
"environment" is their Python code running?
For instance, if you want to write code that runs both in Python
command line and XSI, you need to know which of them is the code
running, particularly for message printing.
The approach I'm using right now is this:
import win32com
try:
c = win32com.client.constants
except AttributeError:
# no "client" attribute when running in shell environment
sENV = 'shell'
else:
sENV = 'xsi'
Application = win32com.client.Dispatch( 'XSI.Application' )
xsi = Application.application
...
So I'm curious how do other people take care of this.
Thanks
Bernard
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi