Jump to content

hython writing statistics to file

Recommended Posts

Hey guys I've been exploring hython in-depth and I'm wondering if there is a way to capture the render statistics of a file and write it to a file. At the moment my only solution is running something like: hython myscript.py > mylog.txt However, I want to write the file from within the script and not redirect the output of the command from the shell.


In my script I'm just doing something like this:

import hou
rop = hou.node("/out/mantra1")
rop.render() # I need the output of this function

Any help appreciated thank you guys!

Share this post

Link to post
Share on other sites

I haven't been able to solve this, I thought .render() would return verbose text to store in a variable but it does not. 


Are you running this from the command line or with houdini?


If the command line you may be able to setup an executeable of the .render() call (include all args) and use the subprocess module to get the stdout in another .py file. That's they way that initially pops into mind.

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