Some confusion with a class variable, but with a twist...

Posted by Omega on Stack Overflow See other posts from Stack Overflow or by Omega
Published on 2010-05-08T21:33:10Z Indexed on 2010/05/08 21:38 UTC
Read the original article Hit count: 155

I have a class called MyPackage.WebServer and it has a property called DBEngine.

I am also dynamically loading a module and class using load_module. Inside this class, it attempts to reference MyPackage.WebServer.

When it does though, DBEngine is not set to the value given when WebServer is instantiated. It's the default (None).

Would the fact that I'm using load_module cause a different object graph to be created and thus isolate my dynamically loaded class from the rest of my python app?

© Stack Overflow or respective owner

Related posts about python

Related posts about dynamic-class-loaders