¿ªÔÆÌåÓý

Locked Problem calling one script from another #scripting


 

Could someone please advise why the following python scripts work together in RPi Thonny, but not from within PanelPro.

The script for the initiating programme, testsend.py :

import subprocess
import sys
x=678
print(x)
subprocess.run(["python3","testreceive.py", str(x)])


and this is the script for the receiving programme, testreceive.py "

import serial
import sys
if len(sys.argv)>1:
? ? y= int(sys.argv[1])
? ? print(1+ y)
else:
? ? print("no argument received")


Thank you in anticipation
Toni

Join [email protected] to automatically receive all group messages.