I am interacting with a python 2.x API written in a non-OO way, it uses module-global scope for some internal state driven stuff. It\'s needed in a context where it\'s no longer
This can be achieved by importing the module via different paths. That is - if in your sys.path you have two different dotted routes to the module, the module cache will create two different instances of the module with different symbol trees, globals and so on.
This can be used to have multiple versions of a library also.
Beware that it will lead to exceptions not being caught (as you are trying to catch the wrong symbol).