Files
OpenHands/opendevin/controller/command_executor.py
RaGe 6e3b554317 Create a CommandExecutor abstract class (#874)
* Create abstract CommandExecutor class

* Use CommandExecutor for Sandbox
2024-04-07 14:57:31 -05:00

25 lines
461 B
Python

from typing import Tuple
from abc import ABC, abstractmethod
class CommandExecutor(ABC):
@abstractmethod
def execute(self, cmd: str) -> Tuple[int, str]:
pass
@abstractmethod
def execute_in_background(self, cmd: str):
pass
@abstractmethod
def kill_background(self, id: int):
pass
@abstractmethod
def read_logs(self, id: int) -> str:
pass
@abstractmethod
def close(self):
pass