Hi Justin, I assumed we were talking about reloading during the development stage where you will most likely code your library as a package (there's no need to reload all dependencies) and have access to the source code as you're the one developing it, under those conditions removing modules from python's cache works way better than any kind of import hook (we managed the cache through a hook at my previous job and it was a nightmare!).
Cheers! On Thu, Aug 21, 2014 at 5:02 AM, Justin Israel <[email protected]> wrote: > But this approach only deletes the direct module you refer to. Any other > existing modules that might have imported the library will still have a > live reference to the old one. To really do a "deep reload" you have to > recurse down all of the dependencies that had been imported, and reload > anything else that might have loaded your original target module. On top of > that, compiled extensions can't be reloaded. > > > > On Thu, Aug 21, 2014 at 8:47 PM, Cesar Saez <[email protected]> wrote: > >> I've been manually removing modules from python cache during years >> without issues, I use it so often that I made a GUI helper to ease the >> process :) >> http://cesarsaez.me/2014/08/hard-reloader.html >> >> -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPamJi9AG-PJAF9ntTwKP5AER1M_jvpPDL19jS8pYM_vMWuUzg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
