Re: Managing a queue of subprocesses?

2006-12-31 Thread Tom Plunket
cypher543 wrote: > That was a very good answer, and it sure sounds like it would work. > However, I failed at implementing it. :( My updated runQueue() function > is: > > def runQueue(self): > self.buildProcess = None > count = 1 # current position in the queue > while True: >

Re: Managing a queue of subprocesses?

2006-12-30 Thread cypher543
That was a very good answer, and it sure sounds like it would work. However, I failed at implementing it. :( My updated runQueue() function is: def runQueue(self): self.buildProcess = None count = 1 # current position in the queue while True: if self.buildPr

Re: Managing a queue of subprocesses?

2006-12-29 Thread Tom Plunket
cypher543 wrote: > self.buildPID = subprocess.Popen(buildCmd, stdout = subprocess.PIPE, stderr = > subprocess.STDOUT) Instead of calling it self.buildPID, you might just call it self.buildProcess or something. It's actually a Popen object that gets returned. So yes you can do what you want: _

Managing a queue of subprocesses?

2006-12-29 Thread cypher543
My app uses a "queue" of commands which are run one at a time. I am using the subprocess module to execute the commands in the queue. However, processes always run at the same time. How can I make one process run at a time, and then execute the next process when the first has terminated? My code is