[Sidefx-houdini-list] re-loading a python module

Guillaume Laforge guillaume at alamaison.fr
Mon Jan 5 04:38:25 EST 2009


Thanks for the link James !

I think that a kind of plugin manager could be handy to manage the 
load/unload of python plugins.
Just a simple tool building a grid from all the scripts/python paths 
with some check box to update some modules. It doesn't sound to 
difficult to do or I miss something ?
Or maybe there is already some methods to deal with this kind of things 
in the hou module ?

Cheers

Guillaume

James Piechota a écrit :
> 'reload' doesn't recursively reload modules. i.e. if your module 'a' 
> imports 'b', reloading 'a' won't reload 'b'.
>
> This page goes into it a bit, and provides a small chunk of code for a 
> "rollback importer" which will handle recursively reloading everything:
>
> http://pyunit.sourceforge.net/notes/reloading.html
>
> James
>
> Andrew D Lyons wrote:
>   
>> You can use reload:
>>
>> http://docs.python.org/library/functions.html#reload
>>
>> Cheers
>>
>> 2009/1/4 Guillaume Laforge <guillaume at alamaison.fr>:
>>     
>>> Hi,
>>>
>>> First, Happy New Year everyone !
>>>
>>> I'm working on a new shelf tool and I'm wondering how do you re-load some python modules ?
>>> My tool import a modul that is not finished and so I need to re-start Houdini each time I update this python file.
>>>
>>> Cheers
>>>
>>>
>>> --
>>> Guillaume Laforge
>>> 3d Technical Director
>>> http://www.alamaison.fr
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>
>>>       
>>
>>     
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>   



More information about the Sidefx-houdini-list mailing list