How to run 2 or more scripts, starting from 1 single script?
As far as I know, scripts (e.g. Python) always run a line at a time, and thus something like: exec(codeA) exec(codeB) # These 2 codes are big can takes about an hour to run each of them. will first run the codeA. codeB won't start until codeA has finished completely. That's fine. But I find out my PC's CPU usage is just around 30% during code running. Then, I wonder, maybe, if there is a way to run codeA and codeB simultaneously with using about 60% CPU, and tremendously speeds up the calculation. I have found something like this in shell script: https://stackoverflow.com/questions/12907721/run-three-shell-script-simultaneously Thus, I am curious of, if any other language has this kind of features? and how to do? (especially in Python) I expect something looks like: exec(codeA) and exec(codeB) # of course this is not working Any suggestions are welcome! :)