2018-02-18, 14:37
Hi all,
I'm trying to write my first KODI addon.
I'd like to execute an external command (which already works successfully) but I'd like to display the output of the program/script.
I am using the following function:
How can I capture the output (stdout) of the program/script and assign it to a variable?
Unfortunately I didn't find an example for that.
Note that currently I'm using only these modules (and it would be nice if I wouldn't need others):
Of course the return code of the external command would be also interesting
Many thanks for help
I'm trying to write my first KODI addon.
I'd like to execute an external command (which already works successfully) but I'd like to display the output of the program/script.
I am using the following function:
Code:
xbmc.executebuiltin('System.Exec(/path/bin/program_or_script)')
How can I capture the output (stdout) of the program/script and assign it to a variable?
Unfortunately I didn't find an example for that.
Note that currently I'm using only these modules (and it would be nice if I wouldn't need others):
Code:
import xbmcaddon
import xbmcgui
Of course the return code of the external command would be also interesting
Many thanks for help