Python scripting editor

   10654   12   2
User Avatar
Member
14 posts
Joined: Oct. 2009
Offline
hi all.

I'm wondering what everyone uses for python scripting.. I come from maya background, and has been scripting in editor like jedit then port it to maya.

Is there a good built-in editor in houdini? is it python source editor?
i miss a feature i could make python tabs in maya's script editor..

what do you all use?

thanks!
User Avatar
Member
201 posts
Joined: July 2005
Offline
gvim
Cheers,
Rob
Digital Supervisor | Stargate Studios Toronto
User Avatar
Member
320 posts
Joined: Aug. 2007
Offline
Gvim / Vim here as well.
www.alan-warren.com
User Avatar
Member
88 posts
Joined: March 2010
Offline
I do not think there is any competition here. Vim is the ultimate winner.
User Avatar
Member
14 posts
Joined: Oct. 2009
Offline
how do I install vim to work with houdini?

:?:
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Vim is hard-core.
Try Cream.

http://cream.sourceforge.net/ [cream.sourceforge.net]

vim like wordpad.
Cream is a nice friendly artist level editor built entirely on top of vim. Much better than gvim. For the hardened vim'ites you can toggle on the “advanced” option and get the familiar modal vim.
There's at least one school like the old school!
User Avatar
Member
14 posts
Joined: Oct. 2009
Offline
awesome ill try out cream.

how do I configure it so i can execute python in cream then it gets sent to houdini?
User Avatar
Member
581 posts
Joined: July 2005
Offline
I love VIM and I also recommend it for any coding stuff.
But VIM and Houdini has a problem.
I sent this last week to support but just in case other people is suffering the same problem or has a workaround.
VIM has a really useful feature called omnicompletion that reallly helps to code faster:
http://vim.wikia.com/wiki/Omni_completion [vim.wikia.com]
But for python vim needs to load the modules you are importing in your source files, and voile! you can't import th hou model into VIM.
Just try the next commands (change $HFS for you houdini path):
:python import sys
:python sys.path.append(“$HFS/houdini/scripts/python”)
:python import hou

You will get an error like this:
Traceback (most recent call last):
File “<string>”, line 1, in <module>
File “/apps/Linux64/houdini/hfs10.0.430/houdini/scripts/python/hou.py”, line 17, in <module>
import _hou
ImportError: /apps/Linux64/houdini/hfs10.0.430/houdini/scripts/python/../../../dsolib/libHoudiniAPPS3.so: undefined symbol: gzopen64

At least this is what I got in my linux box at the office.
And yes, I am launching gvim from a terminal ready for Houdini.
So it is really a pity to not be able to use omnicompletion with VIM and the hou module.
Any workaround for this????
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
201 posts
Joined: July 2005
Offline
Getting slightly different results …

Using gvim 7.0.237, if I do
:python import sys
:python sys.path.append(“$HFS/houdini/scripts/python”)
:python import hou


it says it can't find hou. Looking at the path a bit closer, the $HFS didn't expand so I manually appended to the sys path and when I did python import hou, gvim crashed
Cheers,
Rob
Digital Supervisor | Stargate Studios Toronto
User Avatar
Member
581 posts
Joined: July 2005
Offline
rdms
it says it can't find hou. Looking at the path a bit closer, the $HFS didn't expand so I manually appended to the sys path and when I did python import hou, gvim crashed
If you read my previous post I said:
change $HFS for you houdini path

Of course $HFS doesn't expand in Python.
Anyway if you still want to use $HFS:
:python import os
:python sys.path.append(os.getenv(“HFS”) + ‘/houdini/scripts/python’)

Should work
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
201 posts
Joined: July 2005
Offline
Just to be clear, I did set the sys.path to be something like /mypathtoHoudini/houdini/scripts/python (no $HFS) but gvim still crashed on import of hou module.
Cheers,
Rob
Digital Supervisor | Stargate Studios Toronto
User Avatar
Member
581 posts
Joined: July 2005
Offline
rdms
Just to be clear, I did set the sys.path to be something like /mypathtoHoudini/houdini/scripts/python (no $HFS) but gvim still crashed on import of hou module.
Win or linux?
Anyway I think the problem is the same, hou module in his initialization loads several dynamic libraries and any of them are crashing with VIM.
The other thing that really concern me about this is that, because of the hou mopdule is implemented, I thing is not easier to embeed it in other python tools. Almost any Python IDE out there allows you to load your modules in the python session used by the IDE, O wont be surpraised if the same problem is happing in other development enviroments/tools.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
581 posts
Joined: July 2005
Offline
I have received an email from support.
Seems that the problem loading hou into vim will be solved for H11.
Good times!
Un saludo
Best Regards

Pablo Giménez
  • Quick Links