host.localHost

class otto.host.localHost.LocalHost(log=True)

Bases: BaseHost

name : --is-rst--:py:class:`str`
log : --is-rst--:py:class:`bool`

Determines whether this host should log its output to stdout and log files.

async oneshot(cmd, timeout=None)

Run a command in a fresh subprocess (stateless, concurrent-safe).

Each call spawns an independent process — no state persists between calls, and multiple oneshot() calls can run concurrently via asyncio.gather().

Return type:

CommandStatus

async open_session(name)

Open a named persistent shell session.

Return type:

HostSession

async send(text)

Send raw text to the host’s persistent session.

Return type:

None

async expect(pattern, timeout=10.0)

Wait for a pattern in the host’s session output stream.

Return type:

str

async get(src_files, dest_dir)

Copy files to dest_dir on the local filesystem.

Return type:

tuple[Status, str]

async put(src_files, dest_dir)

Copy files to dest_dir on the local filesystem.

Return type:

tuple[Status, str]

async close()
Return type:

None