code: def get_mods(package):
      
      pkgdir = package.__path__[0]
      matches = filter(None, [PYMOD_RE.match(f) for f in os.listdir(pkgdir)])
      parse_match = lambda groups: (groups[0], int(groups[1]), int(groups[2]))
      return sorted(list(set([parse_match(m.groups()) for m in matches])),
                    key=lambda x: (x[1], x[2]))
docs: List all loadable python modules in a directory
  
      This function looks inside the specified directory for all files that look
      like Python modules with a numeric prefix and returns them. It will omit
      any duplicates and return file names without extension.
  
      :param package: package object
      :returns:       list of tuples containing filename without extension,
                      major_version and minor_version