How to get the update without restart Maya if script changes?


Hi guys,

In trouble to get the update of script in maya editor, my things is like: I have two py files, and
In file, I import, and both these files are located in \document\user…\maya\mayaversion\scripts. Then:
1. Open these two py files in maya script editor, after doing some changes in file, save it and execute

2.Run the file(actually is the UI toggle file, include all functions), but the file seems still execute the old file. Cannot see any result it supposed to generate.
Everytime i have to restart maya if i want to see the right result after changing, this is really time-consuming, anyone can help me?


try to reload the script after importing it

import b as #whatever nameSpace

hope this helps.


yep, this is what I need, Thanks!


additional description to ranjith17: reload(namespace) can only take the file name not the functions from there.