Re: subprocess.Popen instance hangs

2013-08-30 Thread Tim Johnson
* Jerry Hill [130830 07:48]: > On Fri, Aug 30, 2013 at 11:32 AM, Tim Johnson wrote: > > The objective is to display all output, but to also separate error > > messages from normal output. > > I still think you want to use communicate(). Like this: > > p = subprocess.Popen(args,stderr=subpr

Re: subprocess.Popen instance hangs

2013-08-30 Thread Tim Johnson
* Nobody [130830 06:55]: > On Thu, 29 Aug 2013 17:00:21 -0800, Tim Johnson wrote: > > > ## This appears to be what works. > > def __exec(self,args) : > > """Run the process with arguments""" > >p = > >subprocess.Popen(args,stderr=subprocess.PIPE,stdout=subprocess.PIPE)

Re: subprocess.Popen instance hangs

2013-08-30 Thread Jerry Hill
On Fri, Aug 30, 2013 at 11:32 AM, Tim Johnson wrote: > The objective is to display all output, but to also separate error > messages from normal output. I still think you want to use communicate(). Like this: p = subprocess.Popen(args,stderr=subprocess.PIPE,stdout=subprocess.PIPE) output, e

Re: subprocess.Popen instance hangs

2013-08-30 Thread Nobody
On Thu, 29 Aug 2013 17:00:21 -0800, Tim Johnson wrote: > ## This appears to be what works. > def __exec(self,args) : > """Run the process with arguments""" >p = >subprocess.Popen(args,stderr=subprocess.PIPE,stdout=subprocess.PIPE) >while 1 : >output

Re: subprocess.Popen instance hangs

2013-08-29 Thread Tim Johnson
* Tim Johnson [130829 10:51]: > using Python 2.7.1 on OS X 10.7.5 > > I'm managing a process of drush using an instance of subprocess.Popen <...> ## This appears to be what works. def __exec(self,args) : """Run the process with arguments""" p = subprocess.Popen(args,stderr=su

Re: subprocess.Popen instance hangs

2013-08-29 Thread Tim Johnson
* MRAB [130829 11:04]: > On 29/08/2013 19:34, Tim Johnson wrote: > >could use some examples. > > > The subprocess will terminate when it has finished writing its output, > but because you're not consuming any of the output (you're waiting for > it to finish), the buffer fills up and blocks the sub

Re: subprocess.Popen instance hangs

2013-08-29 Thread xDog Walker
On Thursday 2013 August 29 11:34, Tim Johnson wrote: > using Python 2.7.1 on OS X 10.7.5 > > I'm managing a process of drush using an instance of subprocess.Popen > > The process has a '--verbose' option. When that option is passed as > part of the initializer `args' argument, the process will hang

RE: subprocess.Popen instance hangs

2013-08-29 Thread Prasad, Ramit
Tim Johnson > using Python 2.7.1 on OS X 10.7.5 > > I'm managing a process of drush using an instance of subprocess.Popen > > The process has a '--verbose' option. When that option is passed as > part of the initializer `args' argument, the process will hang. > > It should be no surprise as drus

Re: subprocess.Popen instance hangs

2013-08-29 Thread MRAB
On 29/08/2013 19:34, Tim Johnson wrote: using Python 2.7.1 on OS X 10.7.5 I'm managing a process of drush using an instance of subprocess.Popen The process has a '--verbose' option. When that option is passed as part of the initializer `args' argument, the process will hang. It should be no su