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
On Thu, Aug 21, 2014 at 3:55 AM, Fredrik Averpil <[email protected]> wrote: > I never got the sys.modules deleting approach to work (tried it about a > year ago in python 2.6). As far as I understand you’re not supposed to > delete imported modules. That’s not how Python is designed to work. > > Instead I just always (yes, always) import modules with a reload() as well: > > import myModule > reload(myModule) > > Then I make sure to always delete the UIs (and dockControls in Maya) > properly before loading up the UI. This makes it possible to reload the > whole pyqt/pyside app without issues and without having to restart > Maya/Nuke. Example of this in Maya/Nuke here > <https://github.com/fredrikaverpil/pyVFX-boilerplate/blob/master/boilerplate.py> > . > > Regards, > Fredrik > -- 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/CAPamJi-oj10Ld5ojC%2BQYQD6AVpwF0HE_C-eL%2Bay9h%3DE%3DpDM5BQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
