Houdini in stand alone python script

   3695   0   1
User Avatar
Member
1 posts
Joined:
Offline
I'm writing a python script to allow us to submit a simulation from a .hip file to our renderfarm.

The process is the students run a python script which parses the hip file to find any dop's and are presented with ones in the hip to process on the farm.

I have the following example python file

#!/usr/bin/python
import sys, os
sys.path.append(os.environ+“/houdini/scripts/python”)
import hou
hou.hipFile.load(sys.argv)
DOPS=
for object in hou.node(“/out”).children():
DOPS.append(object.name())

print “We have the following DOP Nodes ”,
print DOPS
etc etc

If I run it as is I get a core dump on the file read. If I run it in hython it all works ok,

If I chage the #!/usr/bin/python to /#!/opt/houdini/hython I get the following errors

import: unable to open X server `'.

What I really want to do is run it as a normal command line python script (as I need to do a load of sql stuff to submit to the farm) as in the students will type the name of the script and any command line options

Anyone have any ideas?

Cheers in advance

Jon
  • Quick Links