1

I was wondering if there is a way to run two python scripts at the same time through the command prompt.

I also am wondering if there is a way to run a second python script after another one has already been executed and is currently running.

Thanks

SantiClaus
  • 616
  • 2
  • 8
  • 19

1 Answers1

7

To execute 2 script at the same time, execute python script1.py & python script2.py

To execute one after the other (without waiting for the first one to finish), you could simply open 2 command prompt windows. Execute each script in each window.

To execute one after the other (after waiting for the first one to finish successfully), execute python script1.py && python script2.py

Andreas
  • 2,355
  • 10
  • 20
  • 23
  • python script1.py & python script2.py (concurrently) python script1.py && python script2.py the same (in sequence) ??? – yuzhen Apr 20 '20 at 09:34