Hello all,
I would like to be able to take a module full of class instances,
functions, etc and bind all its names to a separate container class in
a different module. I have come up with the following way to do it..
(module "globals")
class Container:
pass
container = Container()
(module "all_the_stuff")
....define a bunch of stuff...
(module "main")
exec open("all_the_stuff.py").read() in globals.container.__dict__
I feel uneasy about this method. I foresee bad namespace clashes.
What's a better way? :)
Thanks in advance,
Jacob