2018-05-06, 13:51
Hoping for some assistance because what I don't know about this subject would fill volumes.
Trying to convert a working script with absolute paths:
To one using special protocol:
The latter breaks with a 'argument of type 'xbmcvfs.File' is not iterable' error.
Any help would be greatly appreciated.
Trying to convert a working script with absolute paths:
Code:
p = subprocess.Popen(['python', 'g:/kodi/scripts/myscript.py'], stdout=subprocess.PIPE)
while True:
line = p.stdout.readline()
if line != b'':
do_stuff()
else:
break
To one using special protocol:
Code:
from xbmcvfs import File
loc = "special://skin//scripts//myscript.py"
p = subprocess.Popen(['python', File(loc)], stdout=subprocess.PIPE)
while True:
line = p.stdout.readline()
if line != b'':
do_stuff()
else:
break
The latter breaks with a 'argument of type 'xbmcvfs.File' is not iterable' error.
Any help would be greatly appreciated.