Re: import caching

"Jonathan Ellis" <[email protected]> Tue, 08 Jan 2008 19:14:51 -0800
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
On Tue, 8 Jan 2008 20:40:43 -0500, "Jason Persampieri"
<[email protected]> said:
> I've switched over to the standalone web-server and was still seeing this
> problem.  It was especially prevalent when dynamically deciding between
> importing "foo/lib.py" and "bar/lib.py".  Of course, since you have to
> munge
> the sys.path to do either, this behavior is expected.  I worked around it
> by
> including "del sys.modules['lib']" just before my import line.

Hmm, Spyce trackes modules by the full path to the .pyc, so that
shouldn't be a problem.  If you can come up with a reproducible test
case I'd be happy to dig further.  (The code responsible for this is
spyceUtil.scan_modules.)

-Jonathan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace