Running multiple instances of a python script

Metatrons Cube

Regular Member
Joined
Feb 9, 2019
Messages
244
Reaction score
117
First time posting in the programming section here - I'm running a python social automation script which can achieve multiple instances asynchronously if I use multiple terminals, but have been looking into a better way to do this.

Does anyone have any advice on whether subprocess.Popen() is a good option for this as it seems like it's the right way to go?

Each instance need to pass in variables for each of the social accounts (inc. proxy, username, pass etc) and I'm trying to figure out exactly how to use subprocess.Popen for this means, because it seems like the input should be coming from a separate csv per instance which seems weird.

Thanks in advance for any and all advice about this
 
I'll look into
use multiprocessing.dummy
I'm relatively new to threading concepts, as a quick follow-up, if I want to have 100 instances of a script running (ie. 100 different bots) how can I calculate how many cores/cpus I'll need to handle that and will I even need more processing hardware than just running the script normally as a single instance?
 
Now working perfectly, spent a solid amount of time trying to find the right solution to this - much appreciation for the tip
 
Back
Top