Cuckon Posted August 23, 2013 Share Posted August 23, 2013 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. Quote Link to comment Share on other sites More sharing options...
edward Posted August 23, 2013 Share Posted August 23, 2013 People have done that stuff in the past by wrapping Houdini itself and parsing for the crash output. 1 Quote Link to comment Share on other sites More sharing options...
Cuckon Posted August 27, 2013 Author Share Posted August 27, 2013 (edited) 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 August 27, 2013 by Cuckon Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted August 27, 2013 Share Posted August 27, 2013 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 subprocessstatus = 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. Quote Link to comment Share on other sites More sharing options...
Cuckon Posted August 28, 2013 Author Share Posted August 28, 2013 Thanks Luke Olson, I'll have a try~ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.