(self, bin: str, *args: str, **kwargs: Any)
| 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: ... |