Код: Выделить всё
from pyinfra.operations import files, server
files.directory("new_dir")
Код: Выделить всё
result = server.shell("pwd", _chdir="new_dir")
print(result.stdout)
Код: Выделить всё
RuntimeError: Cannot evaluate operation result before execution
Подробнее здесь: https://stackoverflow.com/questions/793 ... th-pyinfra