calling hython from script and get the processed data

   2249   1   0
User Avatar
16 posts
Joined: Aug. 2013
I have a script named A which invokes hython like this'path to the hython command'+' '+'path to script B'+' '+'path to hip file')
what script B contains is:
import sys
args = sys.argv
print args
  hou.hipFile.load( args[1] )
except hou.LoadWarning, e:
  print e
renders = hou.node('/out').allSubChildren()
so the basic idea is to use hython to open a scene, process it, and get some info back(in my case,“renders”).
so how to get data back from or are there other ways to do so?

Any ideas would be appreciated !
Edited by zysnow - Dec. 6, 2016 06:37:05
User Avatar
2307 posts
Joined: June 2008
You can look into using POpen instead []. This way you get a handle and can create a polling loop to review response from the spawned process. However, the app that you launch has to have been written to provide such feedback. Some apps, such as render engines, have a parameter you supply on launch that will trigger progress feedback information as the process runs.
Using Houdini Indie 19.5.
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
  • Quick Links