code: def __setuptools_version(self):
          
          # Read the script directly as a file instead of importing it as a
          # Python module and reading the value from the loaded module's global
          # DEFAULT_VERSION variable. Not all ez_setup scripts are compatible
          # with all Python environments and so importing them would require
          # doing so using a separate process run in the target Python
          # environment instead of the current one.
          f = open(self.script_path(), "r")
          try:
              matcher = re.compile(r'\s*DEFAULT_VERSION\s*=\s*"([^"]*)"\s*$')
              for i, line in enumerate(f):
                  if i > 50:
                      break
                  match = matcher.match(line)
                  if match:
                      return match.group(1)
          finally:
              f.close()
          self.__error("error parsing setuptools installation script '%s'" % (
              self.script_path(),))
docs: Read setuptools version from the underlying ez_setup script.