Re: reloading my own modules

2005-06-07 Thread Lowell Kirsh
Hi, Skip Montanaro wrote: > Also, since it's clear you have already imported dbtest and util, there's no > need to check in sys.modules: > > import dbtest, util > reload(dbtest) > reload(util) Won't this load the modules twice on the first run? I only want to load the modules once e

Re: reloading my own modules

2005-06-07 Thread Skip Montanaro
Lowell> import dbtest, util Lowell> for module in ['dbtest', 'util']: Lowell> if module in sys.modules.keys(): Lowell> reload(sys.modules[module]) Lowell> Is this the best way to do it? It seems a bit verbose, but not Lowell> really all that bad. I was just w

reloading my own modules

2005-06-06 Thread Lowell Kirsh
I have a driver module as well as several other modules. I am running the driver interactively from emacs - that is, I don't restart python on each run. I want to work it such that every time a modify the source for one of the non-driver modules and re-run the driver, the other modules will be