I
I
Ilya Antipenko2012-04-01 18:44:49
Python
Ilya Antipenko, 2012-04-01 18:44:49

How to run multiple python scripts in turn from console?

Hello.

Tell me how you can run several python scripts from the console in turn.

Tried through:

python *


but in this case, only the first script is launched and after that the work is completed.

Tell me how best to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad Zhivotnev, 2012-04-01
@aivus

for i in `ls /path/*.py`; do python $i; done - wait for the execution of the previous
for i in `ls /path/*.py`; do python $i & done - don't wait for the previous one to complete

J
juriUs, 2012-04-01
@juriUs

python /bla/pla2.py & python /bla/bla2.py &

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question