Here is my problem in a nutshell.
Python program calling an external script which prints to stdout:
from subprocess import call
call(["ls", "-l"])
This works fine, if started from a shell, but in Thonny this generates an error message:
>>> %Run randrive.py
Error handling message: Traceback (most recent call last):
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/thonny/running.py", line 645, in _listen_stdout
msg = parse_message(data)
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/thonny/common.py", line 148, in parse_message
return eval(msg_string.encode("ASCII").decode("UTF-7"))
File "<string>", line 1
total 112
^
SyntaxError: invalid syntax
Thank you, Thomas