[Sidefx-houdini-list] Run Script doesn't like Python???

Graham Thompson captainhammy at gmail.com
Mon Mar 22 09:41:59 EDT 2010


I ended up writing my own simple one and throwing it into MainMenuCommon.

     <scriptItem id="runpythonscript">
        <label>Run Python Script</label>
<modifyItem><insertAfter>h.source</insertAfter></modifyItem>
<scriptCode><![CDATA[filepath = hou.ui.selectFile(title="Select Python
script to run", pattern="*.py")
if len(filepath) is not 0:
    fullpath = hou.expandString(filepath)
    execfile(fullpath)]]></scriptCode>
      </scriptItem>

2010/3/22 Pablo Giménez <pablogipi at gmail.com>
>
> Hi.
> I am trying to source some python script using the File menu entry "Run
> Script .."
> Seems it only works with HScript, no chance for Python scripts created using
> the hou.Node.asCode() method.
> I can load these scripts using the python function execute() from a python
> shell.
> Using version 10.0.312
> Thanks
>
> --
> Un saludo
> Best Regards
> Pablo Giménez
> _______________________________________________
> 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