I have a large-ish project that I'm working on. It involves lots of modules with lots of classes inside them, and everything is coordinated by the main thread. Now, I have a variable in the main thread which I need to be accessible from pretty much everywhere (by which I mean by the other modules). I have tried putting "from main import Tree" (Tree being the variable I need) at the top of a module with the rest of its import statements, but for some reason that causes the main thread to not recognize any of the module's classes.
I don't know if what I'm doing is even remotely right, I figured it might work after reading a bit about python namespaces, but I can't think of anything else. I'm working with python 2.6. All help is appreciated.