I have to run a lot of scripts for paper, and I would like to make this automatic. I have several folders (P1, P2,..., PN) in which I have a script ( test1, test2, ... testN) and I need to run all this, but doing on by one by myself I waste a lot of time that I don't have!
I tried subprocess:
where P1_T1 is:
for i in range(5): x = i+2*i print(x) and P1_T2 is:
for i in range(5): x = i+3*i print(x) But it didn't work.



Popenby hand, you should use a loop instead.