Jump to content
Cuckon

Run a Python script when Houdini crashing?

Recommended Posts

Hi guys, I wonder how to run a python script when houdini get crashing. So I can do some interesting stuff like environment logging or send "Mr.John's houdini crashed." to twitter.

Share this post


Link to post
Share on other sites

People have done that stuff in the past by wrapping Houdini itself and parsing for the crash output.

  • Like 1

Share this post


Link to post
Share on other sites

People have done that stuff in the past by wrapping Houdini itself and parsing for the crash output.

Thanks for the info but.. how could I catch that?

Edited by Cuckon

Share this post


Link to post
Share on other sites

The term wrap means launch it from something else. If it were Python you could use the subprocess module to start Houdini and then do something depending on what Houdini spits back.


import subprocess
status = subprocess.check_output('houdini')
if 'something to look for' in status:
...
...
[/CODE]

Then do something based on whatever Houdini spit back (the status variable). Another way would be to setup a watchdog running all the time that looks for the Houdini process and have it do something if there's no Houdini running.

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

×