Run multiple python scripts concurrently


How can I run multiple python scripts? At the moment I run one like so python

I’ve tried python and that doesn’t work: only the first script is run. Also, I’ve tried using a single file like this;

import script1
import script2


However this doesn’t work either.


With Bash:

python &
python &

That’s the entire script. It will run the two Python scripts at the same time.

Python could do the same thing itself but it would take a lot more typing and is a bad choice for the problem at hand.

I think it’s possible though that you are taking the wrong approach to solving your problem, and I’d like to hear what you’re getting at.

Answered By – Christopher Peterson

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published