MCPcopy
hub / github.com/python-poetry/poetry / execute

Method execute

src/poetry/utils/env/base_env.py:457–467  ·  view source on GitHub ↗
(self, bin: str, *args: str, **kwargs: Any)

Source from the content-addressed store, hash-verified

455 return output
456
457 def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
458 command = self.get_command_from_bin(bin) + list(args)
459 env = kwargs.pop("env", dict(os.environ))
460
461 if not self._is_windows:
462 return os.execvpe(command[0], command, env=env)
463
464 kwargs["shell"] = True
465 exe = subprocess.Popen(command, env=env, **kwargs)
466 exe.communicate()
467 return exe.returncode
468
469 @abstractmethod
470 def is_venv(self) -> bool: ...

Calls 1

get_command_from_binMethod · 0.95