This extremely minimal Python module allows you to set a list of command strings to be executed by the system, and it eats through them in a process pool.
from littleworkers import Pool # Define your commands. commands = [ 'ls -al', 'cd /tmp && mkdir foo', 'date', 'echo "Hello There."', 'sleep 2 && echo "Done."' ] # Setup a pool. Since I have two cores, I'll use two workers. lil = Pool(workers=2) # Run! lil.run(commands)
Have comments? Send a tweet to @TheChangelog on Twitter.
Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.