I would like to know how can I open two python functions on the same script and display them in different terminals
def fn1():
print ("1 function")
def fn2():
print("2 function")
I know with subprocess one can open two scripts in different terminal eg:
subprocess.call (['lxterminal', '-e',"python3", "/home/pi/m/code/sensor1.py"])
subprocess.call (['lxterminal', '-e',"python3", "/home/pi/m/code/sensor2.py"])
HOW CAN I DO THE ABOVE WITH FUNCTION IN THE SAME SCRIP.
Thank YOU :)