WRONG:Actions output to file
DBUS actions are runed when extension finish (when iddle loop is finish) so you only can get previous value. Abandon this.
This allow output cout to file instead stdout temporaly
PYTHON side:
tmpfilename = "test" # only use alphanum
InkDbus.ink_dbus_action(None, 'application', 'capture-cout',tmpfilename, None)
InkDbus.ink_dbus_action(None, 'application', 'query-all', None, None)
InkDbus.ink_dbus_action(None, 'application', 'uncapture-cout', None, None)
fileto = f"{tempfile.gettempdir()}{os.path.sep}{tmpfilename}"
while (not os.path.exists(fileto)):
sleep(0.1)
with open(fileto) as f:
content= f.readlines()
os.unlink(fileto)
Edited by Jabier Arraiza