Let\'s face it, the whole business of reloading python code after changing it is a mess. I figured out awhile back that calling import at the in
import
Don't forget that an import is really just assigning a name in a namespace. So, you could reassign that name after reloading:
>>> reload(module2) >>> module1.class1 = module2.class1
Now the class1 object inside module1 refers to the reloaded version from module2.
class1