parameters: (self)
return_statement: return self._subprocess
docstring: The Python executable, matches ``sys.executable``.
docstring_summary: The Python executable, matches ``sys.executable``.
docstring_tokens: The Python executable matches sys . executable .
function: def _get_subprocess(self):
          if self._subprocess is not None and not self._subprocess.is_crashed:
              return self._subprocess
  
          try:
              self._subprocess = CompiledSubprocess(self._start_executable)
              info = self._subprocess._send(None, _get_info)
          except Exception as exc:
              raise InvalidPythonEnvironment(
                  "Could not get version information for %r: %r" % (
                      self._start_executable,
                      exc))
  
          # Since it could change and might not be the same(?) as the one given,
          # set it here.
          self.executable = info[0]
          """
          The Python executable, matches ``sys.executable``.
          """
          self.path = info[1]
          """
          The path to an environment, matches ``sys.prefix``.
          """
          self.version_info = _VersionInfo(*info[2])
          """
          Like ``sys.version_info``. A tuple to show the current Environment's
          Python version.
          """
  
          # py2 sends bytes via pickle apparently?!
          if self.version_info.major == 2:
              self.executable = self.executable.decode()
              self.path = self.path.decode()
  
          # Adjust pickle protocol according to host and client version.
          self._subprocess._pickle_protocol = highest_pickle_protocol([
              sys.version_info, self.version_info])
  
          return self._subprocess
function_tokens: def _get_subprocess ( self ) : if self . _subprocess is not None and not self . _subprocess . is_crashed : return self . _subprocess try : self . _subprocess = CompiledSubprocess ( self . _start_executable ) info = self . _subprocess . _send ( None , _get_info ) except Exception as exc : raise InvalidPythonEnvironment ( "Could not get version information for %r: %r" % ( self . _start_executable , exc ) ) # Since it could change and might not be the same(?) as the one given, # set it here. self . executable = info [ 0 ] self . path = info [ 1 ] """
          The path to an environment, matches ``sys.prefix``.
          """ self . version_info = _VersionInfo ( * info [ 2 ] ) """
          Like ``sys.version_info``. A tuple to show the current Environment's
          Python version.
          """ # py2 sends bytes via pickle apparently?! if self . version_info . major == 2 : self . executable = self . executable . decode ( ) self . path = self . path . decode ( ) # Adjust pickle protocol according to host and client version. self . _subprocess . _pickle_protocol = highest_pickle_protocol ( [ sys . version_info , self . version_info ] ) return self . _subprocess