twisted.python.rebuild
module documentationtwisted.python
View Source
*Real* reloading support for Python.
Class | Sensitive | A utility mixin that's sensitive to rebuilds. |
Function | latestFunction | Get the latest version of a function. |
Function | latestClass | Get the latest version of a class. |
Class | RebuildError | Exception raised when trying to rebuild a class whereas it's not possible. |
Function | updateInstance | Updates an instance to be current. |
Function | __injectedgetattr__ | A getattr method to cause a class to be refreshed. |
Function | rebuild | Reload a module and do as much as possible to replace its references. |
Function | _isClassType | Compare to types.ClassType in a py2/3-compatible way |
Compare to types.ClassType in a py2/3-compatible way
Python 2 used comparison to types.ClassType to check for old-style classes Python 3 has no concept of old-style classes, so if ClassType doesn't exist, it can't be an old-style class - return False in that case.
Note that the type() of new-style classes is NOT ClassType, and so this should return False for new-style classes in python 2 as well.
Reload a module and do as much as possible to replace its references.