def getFilesForName(name):
 if (not os.path.exists(name)):
  if containsAny(name, '*?[]'):
   files = glob.glob(name)
   list = []
   for file in files:
    list.extend(getFilesForName(file))
   return list
  name = _get_modpkg_path(name)
  if (not name):
   return []
 if os.path.isdir(name):
  list = []
  os.path.walk(name, _visit_pyfiles, list)
  return list
 elif os.path.exists(name):
  return [name]
 return []

def getFilesForName ( name ) : if ( not os . path . exists ( name ) ) : if containsAny ( name , '*?[]' ) : files = glob . glob ( name ) list = [ ] for file in files : list . extend ( getFilesForName ( file ) ) return list name = _get_modpkg_path ( name ) if ( not name ) : return [ ] if os . path . isdir ( name ) : list = [ ] os . path . walk ( name , _visit_pyfiles , list ) return list elif os . path . exists ( name ) : return [ name ] return [ ]
get a list of module files for a filename .