def defaultLoader( cls, envVar ) : with cls.__defaultLoaderMutex: loader = cls.__defaultLoaders.get( envVar, None ) if loader : return loader sp = "" if envVar in os.environ : sp = os.environ[envVar] else : msg( Msg.Level.Warning, "ClassLoader.defaultLoader", "Environment variable %s not set." % envVar ) loader = cls( SearchPath( os.path.expandvars( sp ), ":" ) ) cls.__defaultLoaders[envVar] = loader return loader
def searchPath(self): return SearchPath(self.__searchPaths)