[Sidefx-houdini-list] Tcl Functions

Rick Walia rickw3d at gmail.com
Mon Feb 20 12:47:53 EST 2006


Hello,

I don't know anything about tcl but I use perl and python to interact with
houdini. A few months ago I asked about calling python from houdini in a
custom function and got some helpful responses. You might want to search the
archives in this respect.

In any case.......
In the textport if you type exhelp system. You'll see:
# / --------------------------------------
string system (string)
Returns the output of a unix command.
# / --------------------------------------


So I created a sample python script in my home directory called test.py
inside i just have:
# / --------------------------------------
print "Hello from Python"
# / --------------------------------------


Now inside houdini, I typed the following in the textport:
# / --------------------------------------
set myCmd = `system("python $HOME/test.py")`
echo $myCmd
# / --------------------------------------

The result is:
Hello from Python

Hope this helps,

/Rick





On 2/20/06 10:57 AM, "Jaideep Khadilkar" <iamjaideep80 at yahoo.com> wrote:

> Hi Everybody.........
>  
>  I am trying some Tcl scripting with Houdini. The Cotent related to this on
> Odwiki is very good. But can tcl return a value that I can use in Hscript.
>  eg. Suppose I am writing a code in Hscript, and I just want to make use of
> string functions in tcl, then can I just call those funtions and get the data
> from tcl, and use that in Hscript??????
>  
>  Plz Explaine with examples, if u can , cause I am somewhat new to tcl......
>  Thanking in advance.
>  
>  ---------iamjaideep80
> 
> ---------------------------------
>  Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new
> and used cars.
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list





More information about the Sidefx-houdini-list mailing list