Jump to content

Python scripting with all IDE "gadgets"


sanchoflat

Recommended Posts

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
Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

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.

Link to comment
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 :)

Link to comment
Share on other sites

  • 10 months later...

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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...