Python Forum

Full Version: Run one Python Script from Another Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, if I do import "scriptname" I can load one python script from another. I am trying to make a main script that launches 5 seperate python programs at the same time.. but in different shells.. or windows.. Any way I can do that? Any way to do an import "scriptname" (into its own shell/window?)
Yes, there are several ways. It depends on what your scripts are doing. You could always look into threading, sub-processes, multiprocessing, etc.

But, if you want an easy way to just run multiple scripts from one main script take a look at the tricks used here:
https://stackoverflow.com/questions/4910...er-another
https://stackoverflow.com/questions/5386...ncurrently