MCPcopy Create free account
hub / github.com/ImageEngine/cortex / __findAllClasses

Method __findAllClasses

python/IECore/ClassLoader.py:270–294  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

268 raise RuntimeError( "Class \"%s\" doesn't exist." % name )
269
270 def __findAllClasses( self ) :
271
272 if self.__foundAllClasses :
273 return
274
275 self.__classes = {}
276 for path in self.__searchPaths.paths :
277
278 for root, dirs, files in os.walk( path ) :
279
280 if path.endswith( os.path.sep ) :
281 nameBase = root[len(path):]
282 else :
283 nameBase = root[len(path)+1:]
284
285 dirsToPrune = set()
286 for d in dirs :
287
288 if self.__updateClassFromSearchPath( path, os.path.join( nameBase, d ) ) :
289 dirsToPrune.add( d )
290
291 for d in dirsToPrune :
292 dirs.remove( d )
293
294 self.__foundAllClasses = True
295
296 # throws an exception if the version is no good
297 @staticmethod

Callers 1

classNamesMethod · 0.95

Calls 5

joinMethod · 0.80
lenFunction · 0.50
addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected