[Distutils] Is there any harm in clearing sys.path_importer_cache from time to time?

Jim Fulton jim at zope.com
Fri Jun 23 17:37:49 CEST 2006


I have a script based on setuptools that invokes easy install to  
check for
and download newer distributions.  I allow users to specify whether or
not they want unzipped downloads.  As a result, easy_install will  
sometimes
replace a zip file with a directory or the other way around.  This  
leads to
problems in the invoking program because the sys.path_importer_cache
is stale.  Does anyone know if it is safe to clear the cache from  
time to
time?  If so, I'd be inclined to clear it any time I invoke  
easy_install.

If it isn't safe, I'll probably just forego the feature of letting users
force downloads to be unzipped, which I may do anyway to be safe. :)

Jim

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the Distutils-SIG mailing list