[Sidefx-houdini-list] call opparm from outside houdini
luca at cinesite.co.uk
Tue May 1 11:59:55 EDT 2007
I'm referring to python script. Is there a reason why I should promote
"opparm -c %s cache_execute\n" % object instead of strings operations?
This is the current script (not working):
command = "opparm -c "+node+" "+param+"\n"
phpscript = os.popen("hscript ........../filename.hip","w")
Ammon Riley wrote:
> On 5/1/07, Luca Zappala <luca at cinesite.co.uk> wrote:
>> I've got a question about the pipe python implementation:
>> how do I pass both strings and variables into phpscript.write("""put
>> variable in here""") ?
> Are the variables are in python, or in hscript? If they're in python,
> you just use normal python methods for getting your variable into a
> string, and pass the complete string to hscript:
> object = "/obj/geoTest"
> command = "opparm -c %s cache_execute\n" % object
> For more info on that, see:
> If the variables are in hscript, then you can just use the exact same
> command as you'd type into hscript:
> phpscript.write("set object = /obj/geoTest\n")
> phpscript.write("opparm -c $object cache_execute\n")
>> and what does bye stand for?
> The "bye" command, I think, exits hscript (I don't have houdini in
> front of me
> at the moment, so I can't check to be sure). Rather than using "bye",
> I'd just close the pipe.
>> Also I had a look at the ref page you sent but I get an error using
>> writeline (object has not attribute writeline).
> That email was written in 1999. No doubt, you're using a more recent
> of python. :)
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list