<div dir="ltr">Hi all,<div><br></div><div>I'm using the python bindings of lxc and trying to capture the output of container.attach_wait(lxc.attach_run_command, ["ls"]) in a variable.</div><div>I tried modifying the sys.stdout and sys.stderr to StringIO. But that is capturing only the output and error printed by python's print statements. It is not capturing the output of lxc attach though.</div><div><br></div><div>One approach is I can call lxc-attach command through subprocess. Is there any other way I can achieve this while still using lxc python bindings.</div><div><br></div><div>Thanks</div><div>Livingston</div></div>