0

It is possible to open 2 different consoles for the execution of each script, if this is the case what would be the modification to be made in this code

import subprocess, os

scripts_paths= ("C:/Users/Luis/snmp_nms.py","C:/Users/Luis/trap_receiver.py")

procesos=[subprocess.Popen(["python",script],shell=True) for script in scripts_paths]

exit_codes=[p.wait() for p in procesos]

if not any (exit_codes):
 print("Procesos terminados")

else:
 print("Algunos procesos terminaron de manera innesperada")

The script executes the two programs at the same time, however the messages appear mixed in the console, so it is required to appear separately.

0 Answers0