Jump to content
sanchoflat

Python scripting with all IDE "gadgets"

Recommended Posts

Hi all, i am interesting in coding Python scripts, but not in python source editor - in pycharm or sublime text.

Have anybody ideas, how to install hou autocomplite in favorite IDE?

Thx.

Edited by sanchoflat

Share this post


Link to post
Share on other sites

For Sublime:

I guess you have package control installed.

So open package control and install SublimeCodeIntel.

Open the 'config' file under C:\Users\marcel\.codeintel and paste this in.

(Make sure to configure the houdini path, if you use another build.)

{

"Python": {

"python": 'C:/Python26/python.exe',

"pythonExtraPaths": [

'C:/Python26/Lib/site-packages',

'C:/Program Files/Side Effects Software/Houdini 12.5.371/houdini/python2.6libs'

]

}

}

  • Like 2

Share this post


Link to post
Share on other sites

sanchoflat, is it working for u? (with sublime text 2)

It gives me an error 'could not find data for blob "hou"'. Any one had this problem before?

thanks.

Share this post


Link to post
Share on other sites

sanchoflat, is it working for u? (with sublime text 2)

It gives me an error 'could not find data for blob "hou"'. Any one had this problem before?

thanks.

Have you found what was the problem? Maybe I can help you.

Share this post


Link to post
Share on other sites

Have you found what was the problem? Maybe I can help you.

Would be great, because I can´t figure out! Searched all topics about that, but nothing works here...

Thanks!

Share this post


Link to post
Share on other sites

I'm also using Sublime Text, but recently switched to PyCharm for my Python scripting and it's a much more pleasant experience. SublimeCodeIntel also gave me errors and I could never get a reliable code completion going in Sublime. In PyCharm everything works out of the box and it has a lot of very intelligent features to support Python coding. I would suggest you give it a try.

Share this post


Link to post
Share on other sites

It gives me an error 'could not find data for blob "hou"'. Any one had this problem before?

Sounds like you did everything right. I really need to write up a tutorial on Sublime + Houdini.

The fix for SublimeCodeIntel is an annoying one. In Sublime, go to Preferences>Browse Packages and drill down to this directory:

\Sublime Text 2\Packages\SublimeCodeIntel\libs\codeintel2

In there, open manager.py and edit line 447 to be:


MAX_FILESIZE = 4 * 1024 * 1024
[/CODE]

Save and restart Sublime and now when you type hou.[something] SCI will give you suggestions. The error was occurring because SideFX made the hou.py huge- it's over 2MB of code, mostly comments. I've asked for a preference to make it easier to adjust the max file size to scan:

https://github.com/SublimeCodeIntel/SublimeCodeIntel/issues/350

And the reason it is set to 1MB is because Open Komodo Edit, the origins of this tool, had a bug with files above a certain size. The default used to be 50MB, so I think it's safe to bump it a few mb :)

Share this post


Link to post
Share on other sites

Thanks!! Thats amazing! works like magic! haha.

That one I would have never guessed! Thanks again!

Share this post


Link to post
Share on other sites

Do you guys know how to make it work with Sublime Text 3 (Windows 7-64bit, Houdini 13.0) ?

I have portable installation of ST3, I installed SublimeCodeIntel from Package Control. I tried to put that .config setup into c:\Users\Petr\.codeintel\config file and also into ST3->Preferences->Package Settings->SublimeCodeIntel->Settings-User

{
"Python": {
"python": 'C:/Python26/python.exe',
"pythonExtraPaths": [
'C:/Python26/Lib/site-packages',
'C:/Program Files/Side Effects Software/Houdini 13.0.538/houdini/python2.6libs'
]
}
}

(my site-packages folder is empty)


 

I set up manually MAX_FILESIZE = 4 * 1024 * 1024 limit in manager.py too.

Still without any luck and I got same error as Guilherme (could not find data for blob "hou"')

 

The user\.config\db folder grow up about 13MB with python 2.6(.4) paths and about 12MB with 2.7.(8).

 


Is it problem of ST3, SublimeCodeIntel for ST3? or something wrong with my setup/configs?
Are you able to make it work with ST3 or you are using it only in Sublime Text 2?

Cheers

Share this post


Link to post
Share on other sites

In Sublime Text 2 SublimeCodeIntel works with hou module without problem (with the tricks mentioned in this topic).
In Sublime Text 3 I wasn't able to make it work together.

So I switch from SublimeCodeIntel to Sublime JEDI (https://github.com/srusskih/SublimeJEDI)
I installed it with Package Control and I just added path to the actual $HFS to the user settings

"python_package_paths": ["C:/Program Files/Side Effects Software/Houdini 13.0.538/houdini/python2.6libs"],

And it works without any hassle :)

 

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×