Reload python plugin while developing?

   2367   3   0
User Avatar
Member
13 posts
Joined: Dec. 2012
Offline
Hey

Quick question:
We are developing a plugin for Houdini. The otls do not change, but our python scripts (python2.7libs and python3.7libs folder).
How can you reload a scripted python plugin while Houdini is running?
I have found some posts in this forum, but they do not seem to work.

Do you have any solution?
User Avatar
Member
387 posts
Joined: Nov. 2008
Offline
For reloading python modules I use:
reload(module)

For both py2.7/py3.7 you can do:
from imp import reload

It's good to remove that reloading for the production version.
User Avatar
Member
13 posts
Joined: Dec. 2012
Offline
Thanks.

It seems to work a bit.

The plugin has some other script files that are imported into the main module.
And it requires to reload all scripts one by one :-(
User Avatar
Member
3 posts
Joined: Oct. 2021
Offline
pezetko
It's good to remove that reloading for the production version.

Does it cause overhead to have it on for all custom HDAs that requires it?
( assuming you are reloading relatively small modules )


the HDAs' Python Module gets loaded when starting the Houdini session and when clicking a button that calls back a function of that module. Correct?
  • Quick Links