cmd run python with output redirection, when python run a start, cmd still waiting for start finish
cmd:
python 1.py >> log.txt
in 1.py:
import os
os.system("start python 2.py")
in 2.py:
import time
for i in range(50):
time.sleep(1)
print(i)
1.py can close, but cmd still waiting 2.py close.
how to set it so that when 1.py is closed, cmd is also finished too?