def _GetVersionsPerPyScripts(self, projects):
    projects_path = os.path.dirname(self._data_directory)
    projects_path = os.path.dirname(projects_path)

    py_script_glob = os.path.join(self._data_directory, u'scripts', u'*.py')
    versions_per_py_script = {}
    for path in glob.glob(py_script_glob):
      py_script_file = ScriptFile(path)

      version = None
      logging.info(u'Reading: {0:s}'.format(path))
      if py_script_file.ReadVersion():
        version = py_script_file.version
      if not version:
        version = u'missing'

      versions_per_py_script[py_script_file.name] = {version: []}

    for project in projects:
      project_py_scripts_path = os.path.join(projects_path, project.name)

      for py_script in versions_per_py_script.keys():
        py_script_path = os.path.join(project_py_scripts_path, py_script)
        if not os.path.exists(py_script_path):
          continue

        py_script_file = ScriptFile(py_script_path)

        version = None
        logging.info(u'Reading: {0:s}'.format(py_script_path))
        if py_script_file.ReadVersion():
          version = py_script_file.version
        if not version:
          version = u'missing'

        projects_per_version = versions_per_py_script[py_script]
        if version not in projects_per_version:
          projects_per_version[version] = []

        projects_per_version[version].append(project.name)

    return versions_per_py_script
Retrieves the versions per py script.
dataset/ETHPy150Open libyal/libyal/scripts/overview-generate.py/StatusWikiPageGenerator._GetVersionsPerPyScripts