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

James Piechota jpiechot at rhythm.com
Sun Jan 4 13:16:58 EST 2009


'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
>>
> 
> 
> 




More information about the Sidefx-houdini-list mailing list