def treeWalk(moduleList, dirname, fnames):
 dirname = dirname.replace('\\', '.').replace('/', '.')
 if dirname.startswith('Cura.gui'):
  return
 if (dirname == 'Cura.util.pymclevel'):
  return
 if (dirname == 'Cura.util.Power'):
  return
 if (dirname == 'Cura.plugins'):
  return
 if (dirname == 'Cura.resouces'):
  return
 for moduleName in filter((lambda f: f.endswith('.py')), fnames):
  moduleName = moduleName[:(-3)]
  if (moduleName == '__init__'):
   continue
  fullName = ('%s.%s' % (dirname, moduleName))
  try:
   module = __import__(fullName, fromlist=['Cura'], level=1)
   moduleList.append(module)
  except:
   print ('Failed to load: %s' % fullName)

def treeWalk ( moduleList , dirname , fnames ) : dirname = dirname . replace ( '\\' , '.' ) . replace ( '/' , '.' ) if dirname . startswith ( 'Cura.gui' ) : return if ( dirname == 'Cura.util.pymclevel' ) : return if ( dirname == 'Cura.util.Power' ) : return if ( dirname == 'Cura.plugins' ) : return if ( dirname == 'Cura.resouces' ) : return for moduleName in filter ( ( lambda f : f . endswith ( '.py' ) ) , fnames ) : moduleName = moduleName [ : ( - 3 ) ] if ( moduleName == '__init__' ) : continue fullName = ( '%s.%s' % ( dirname , moduleName ) ) try : module = __import__ ( fullName , fromlist = [ 'Cura' ] , level = 1 ) moduleList . append ( module ) except : print ( 'Failed to load: %s' % fullName )
callback from the os .