Initialize with stripping newlines.
(
self,
strip_newlines: bool = False,
return_err_output: bool = False,
persistent: bool = False,
)
| 29 | """Executes bash commands and returns the output.""" |
| 30 | |
| 31 | def __init__( |
| 32 | self, |
| 33 | strip_newlines: bool = False, |
| 34 | return_err_output: bool = False, |
| 35 | persistent: bool = False, |
| 36 | ): |
| 37 | """Initialize with stripping newlines.""" |
| 38 | self.strip_newlines = strip_newlines |
| 39 | self.return_err_output = return_err_output |
| 40 | self.prompt = "" |
| 41 | self.process = None |
| 42 | if persistent: |
| 43 | self.prompt = str(uuid4()) |
| 44 | self.process = self._initialize_persistent_process(self.prompt) |
| 45 | |
| 46 | @staticmethod |
| 47 | def _initialize_persistent_process(prompt: str) -> pexpect.spawn: |
nothing calls this directly
no test coverage detected