[Sidefx-houdini-list] Custom Expression's calling external language (python/perl)

Rick Walia rickw at the-mill.com
Thu Oct 13 11:12:41 EDT 2005


Rob Pieké wrote:
> Sorry, the stuff inside () should be quoted. I meant to type:
> -> echo `system( "python myScript.py myArgs" )`
> 
>> Will this work?
>> -> echo `system( python myScript.py myArgs )`


uhmn that surely does work great in the textport. How would I go about 
intergrating that into a custom expression?

For example:
I have a python script that is set to return the incoming string(sys.argv[1].)


In houdini I write a custom expression:
-----------------------------------
string myFunc(string source;)
     string outstr = "";
     outstr = `system("python test.py"  + source )`;
     return(outstr);
-----------------------------------
If I echo this in the textport:
-> echo `myFunc("hello world")`

This will print return nothing in textport.


-- 
Rick Walia

The Mill NY






More information about the Sidefx-houdini-list mailing list