How to execute a script from another script and other script does notdo busy wait.

Jan Kaliszewski zuo at chopin.edu.pl
Thu Jan 7 15:18:27 EST 2010


Rajat <rajat.dudeja at gmail.com> wrote:

> I've single CPU machine. I've a feeling that the thread created, which
> would run script2, would eat up all of the CPU if I do not use sleep()
> in script2.

> That way, script1 would still be waiting for script2 to finish.

Single CPU is not a problem for threads (in fact it's even better).
It'll work. Try it.

Another possibility is to run script2 in a separate process (e.g. using
subprocess module).

Cheers,
*j



More information about the Python-list mailing list