Python package goodness

March 20th, 2005 by Patrick Boucher - Viewed 1589 times - Popularity: 3%




A little while back I spoke of Python’s win32com module and why you have to know it exists in the XSI context as well as a tip concerning Application.LogMessage("")… Well why not make things a little simpler still.

If you unzip this file, you can add just one simple line to the top of your scripts and get quick access to some nice shortcuts in your Python scripts. What is of more importance is that by using this same line in your python packages you get the same shortcuts and flexibility in your packages as you do inside XSI itself.

1
from pb.xsi import *

This will give you access to XSI constants, access to the Application object through the xsi variable, a sortcut to Application.LogMessage("") through the log("") function and many more. (I sound like a used car salesman!)

Installation instructions included in the zip file. Just remember to unzip while keeping the integrity of the paths in the archive.

Need a hand? E-Mail me.
See you shortly.

Leave a Reply