Jump to content
Sign in to follow this  
probiner

Is there a way to use Houdini Group Syntax with Python?

Recommended Posts

I'm looking at way to filter lists of strings with a syntax similar to the Houdini's Group Syntax, where defining a range is as simple as
 

0-100


or stacking parameters as easy as

0-10 ^5

 

Now, regex provides this and more but its verbose and awful to look at in a parameter and to provide to people without the Regex manual, unlike something as simple as
 

0-200:4 (select each 4th from 0 to 200)

that has some resemblance with Python's string/list slicing syntax.

There's re, glob, fnmatch and hou.patternMatch, but none seem to provide this simple interface. Does anyone know of any similar way of going about matching strings?

Thanks
prb

Edited by probiner

Share this post


Link to post
Share on other sites

I've hacked this but submitted an RFE so this may be offered natively, since for me it can make sense to think of work items as points with attributes which are beautifully filtered by Group Syntax.

Cheers
prb

FilterByGroupSyntax.gif.6837fca313996fc881ded10d9e33ab7b.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×