[Sidefx-houdini-list] python expressions... how we doing?

Peter Bowmar pbowmar at gmail.com
Wed Jan 23 03:05:04 EST 2008

Hey Rangi,

First off, can't help you :)

Second, I've been getting into Python for scripting stuff, like the
Hython shell, and the cookbook is great for that. Just the solid
string manipulation and the "unexpandedString()" function make it all
worthwhile :)

However, from what I've seen, the Python use in Expressions isn't as
great, because you have to type WAY too much stuff and also because
Python is a lot slower than custom Hscript expressions.

We're continuing to use Hscript expressions (custom or otherwise)
while moving to Python to replace scripting in Hscript. I don't see
that changing anytime soon, mainly due to speed issues as very often a
custom expression runs loops, or gets evaluated many times per frame
on multiple operators.

However, to be fair, because of the lack of Cookbook examples, I
haven't done extensive testing so this might be better in 9.1 but I
don't have time to learn it without the examples ;)


Peter B

On 23/01/2008, Rangi Sutton <rangi at kanuka.com.au> wrote:
> Hey guys,
> I'm on my own here ATM, and keep trying to get my toes wet with python
> expressions, but I'm still having trouble with basics...
> How's everyone else doing?
> I was hoping the cook-book would get me cooking but I can't seem to find
> everyday expression examples.
> Am I missing a docs page, or a forum thread, are people just sticking
> with old skool expressions, am I dumb? too early?
> Can we flesh a few out here?
> I'll start. I just whacked this into an object merge's obj_path... it
> ain't pretty but I do this kinda thing all the time. How would I express
> this in python?
> ../../../`opinput("..",0)`/wheel_project/OUT
> Cheers,
> Rangi.
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

More information about the Sidefx-houdini-list mailing list