Reload python modules in nuke

While developing tools for Nuke in Python, If you are importing multiple classes in main class and are trying to reload the module, you may not see the changes made to imported classes until you restart Nuke.

Reload wont help either but you you can use the code below to remove the module from Nuke environment. Import statements will import the module again but this time with the changes you have made.

import sys
keys = sys.modules.keys()
The tablet is manufactured by Ajanta Pharma in  discount sale viagra hygienic room conditions. In perspective of the ampleness and indications of the solution, the  tadalafil india estimations may be stretched to 100 mg but be sure to consult your health practitioner initial before doing that. Kamagra soft tabs include ingredient known as 'sildenafil citrate', helps to form rigid  sans prescription viagra erection by supplying more amount of blood needed to sustain an erection. When dependence creeps in to a family of plants termed as Panax ginseng, the from uk viagra  medicinal use of this herb can be traced back nearly 2000 years. for key in keys:
# replace modulename with the module you want to re-import
if key.startswith( 'modulename' ):
del sys.modules[key]


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.