> #!/bin/bash
> for i in `seq 1 1000`
>  do
>  my-other-script &
> done
> wait
> echo "all done"
>
> ...Alternatively, I know I can use os.fork(), os.exec() 
> and os.wait() but this seems cumbersome.  

Bash is optimised for process control, in that it excels. 
For general purpose programming it is both very slow and 
somewhat clunky. Python by contrast is optimised for 
general purpose programming, which means when it comes 
to process control it can be a little clunky.

I suspect fork/exec/wait is your best solution. The only 
real alternative would be to code the process work in python 
and call those functions in separate threads - much more 
efficient but also much more work!

There ain't no perfect language!

Alan G.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to