""" Test script for sending 3 messages to 3 workers """ import subprocess import time def start(): proc = subprocess.Popen(["/tmp/nats_test/sender"]) print "started subprocess" return proc procs=[] for i in range(3): procs.append(start()) while True: result_list=[p.poll() for p in procs] print result_list running = None in result_list if not running: break time.sleep(1)