An enhanced version of recursive reload found somewhere on the web. Very useful for Maya python development. Utility will recursively reload any modules from some starting module provided as an argument.
Installation
rreload is a part of FX Python Tools. Download fxpt from Github and place it in your PYTHONPATH directory.
Usage
from fxpt.fx_utils.rreload import rreload rreload(myModule)
Arguments
rreload(module, remapping=False, verbosity=0)
module – starting module for reload
remapping – enable this option if you importing attributes from modules rather than importing a whole module:
from MyModule import someProcedure from MyModule import someClass as myClass from AnotherModule import *
verbosity – set to 1 or 2 for additional info during rreload process. Useful for debugging.
Ignored modules
Any modules which path (not a name of the module) contains a string from IGNORE_DIRECTORIES list will be skipped from recursive reload procedure.