Importing a file into another module's namespace

2009-04-27 Thread Gary Oberbrunner
Hi; my first time posting here. I have a somewhat tricky problem I'd like some help with. I have a module, foo.bar, that defines a number of functions and variables as usual. Now after importing foo.bar, I'd like to load another file of code (say xyz.py), but *into* foo.bar's namespace. So if x

Re: Importing a file into another module's namespace

2009-04-28 Thread Gary Oberbrunner
- "Steven D'Aprano" wrote: > On Mon, 27 Apr 2009 21:46:13 -0400, Gary Oberbrunner wrote: > > > ...Now after importing foo.bar, I'd like to load > > another file of code (say xyz.py), but *into* foo.bar's namespace. ... > > import foo.bar