Jump to content

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


probiner

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...