import subprocess

class HeaterInstance:
    def __init__(self, host):
        self.host = host

    def execute_command_and_return_output(self, command):
        # Define the command to execute
        command = "boinccmd --host " + self.host.address + " --passwd '" + self.host.password + "' " + command
        # Execute the command and capture the output
        output = subprocess.check_output(command, shell=True)
        # Decode the output if needed (for Python 3)
        output = output.decode("utf-8")
        # Print or process the output
        return output