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!

Link to comment
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.

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...