pyinfra.api.connectors.util module

pyinfra.api.connectors.util.escape_unix_path(path)

Escape unescaped spaces in a (unix) path.

pyinfra.api.connectors.util.get_sudo_password(state, host, use_sudo_password, run_shell_command, put_file)
pyinfra.api.connectors.util.make_unix_command(command, env=None, su_user=None, use_su_login=False, sudo=False, sudo_user=None, use_sudo_login=False, use_sudo_password=False, preserve_sudo_env=False, shell_executable=None, raw=True)

Builds a shell command with various kwargs.

pyinfra.api.connectors.util.make_win_command(command, env=None, shell_executable=None)

Builds a windows command with various kwargs.

pyinfra.api.connectors.util.read_buffers_into_queue(stdout_buffer, stderr_buffer, timeout, print_output, print_prefix)
pyinfra.api.connectors.util.run_local_process(command, stdin=None, timeout=None, print_output=False, print_prefix=None)
pyinfra.api.connectors.util.split_combined_output(combined_output)
pyinfra.api.connectors.util.write_stdin(stdin, buffer)