Tired of LogMessage?
March 4th, 2005 by Patrick Boucher. Viewed 1824 times.OK…
1
Application.LogMessage("Whatever")
Am I tired of writing this in my XSI Python scripts you think? In Python, variables are basically pointers to the actual object and everything in Python is an object, functions included… Hmmm…
Try using this at the top of your python scripts:
1
2
xsi = Application
pr = xsi.__getattr__("LogMessage")
Now you can do:
1
2
xsi.Whatever(attrib)
pr(whatever.Property)
instead of
1
2
Application.Whatever(attrib)
Application.LogMessage(whatever.Property)
All of this with absolute minimal [...]




