python commandline

   3972   5   1
User Avatar
Member
32 posts
Joined: Jan. 2010
Offline
I have been trying this
http://www.sidefx.com/docs/houdini10.0/hom/commandline [sidefx.com]
I have written this function in the python command line but when i call enableHouModule()
it popsup this error
>>> enableHouModule()
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “<stdin>”, line 10, in enableHouModule
File “C:\Python26\lib\os.py”, line 423, in __getitem__
return self.data
KeyError: ‘$HFS’
I have set the HFS environment variable to point to c:\Program Files\Side Effects Software\Houdini 11.0.547


Please let me know how to do this
User Avatar
Member
7871 posts
Joined: July 2005
Offline
On Windows, try using backslashes in your path instead of forward slashes. I'm just totally guessing here. ie.
sys.path.append(os.environ + “\houdini\scripts\python”)

Note also that this has change in H11.X which should probably now read more like:
sys.path.append(os.environ + “\houdini\python2.6libs”)
User Avatar
Member
7871 posts
Joined: July 2005
Offline
PS. On Windows, this likely won't work unless you're using the Python distribution that comes with Houdini. The regular python distribution from python.org will NOT work because it is compiled using a different compiler.
User Avatar
Member
46 posts
Joined: Jan. 2012
Offline
hi,
is that possible using hou module with another app,
like maya, nuke..etc now?
thanks!!
User Avatar
Member
7871 posts
Joined: July 2005
Offline
On Linux, probably

see http://www.sidefx.com/docs/houdini12.5/hom/commandline [sidefx.com]
User Avatar
Member
46 posts
Joined: Jan. 2012
Offline
thank you!!
  • Quick Links