I have python files (named in same way) in different folders. I want to run all python files at the same time with one script, any of the terminals (of the executed files) should not to be closed when the new terminal is opened. Which means, I want them to run simultaneously, each in a new/different terminal. What kind of script could do this?
Asked
Active
Viewed 293 times
1
-
1Does this answer your question? [How to run multiple python file in a folder one after another](https://stackoverflow.com/questions/36836557/how-to-run-multiple-python-file-in-a-folder-one-after-another) – Ganesh Tata Nov 10 '20 at 09:58
-
What operating system are you on? Your question can be answered with a batch file or shell script, depending on the platform you're on, unless you're looking for a pure Python solution for some reason? – Grismar Nov 10 '20 at 10:09
-
I use windows. I prefer a python solution but I don't mind other solutions. – Amal Bradai Nov 10 '20 at 10:19
1 Answers
0
SOLVED
I just had to use:
subprocess.Popen("python pathtoeachfile//file.py", creationflags=subprocess.CREATE_NEW_CONSOLE)
and loop over my files.

Amal Bradai
- 17
- 4