Category Archive for 'Thoughts'

Random thoughts are gathered here. They might be inquiries that are thrown out to the greater community, or just something that was figured out lately but still requires some digging into before a proper article can be written up. Anything goes.

You would like to submit an article to XSIBlog, whatever the category? Don't hesitate, it might even get you full authorship status to XSIBlog if you do so.



Tired of LogMessage?

March 4th, 2005 by Patrick Boucher. Viewed 1786 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 [...]

Am I a programmer?

February 9th, 2005 by Patrick Boucher. Viewed 1566 times.

One of my friends has fun telling me that I”m not really a programmer because my code isn”t compiled. I mostly use scripting languages so I can”t be a programmer, can I?
To which I reply: are you really a programmer if your ubber-complex program fits in twenty lines and the heavy lifting is done by [...]