Re: Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
On Friday, March 24, 2017 at 2:27:09 PM UTC-7, eryk sun wrote: > On Fri, Mar 24, 2017 at 8:44 PM, adam.c.bernier wrote: > > On Friday, March 24, 2017 at 1:37:49 PM UTC-7, eryk sun wrote: > > > >> Without knowing the command you're running, all we can do is > >> speculate. It could be that it's an

Re: Subprocess .wait() is not waiting

2017-03-24 Thread eryk sun
On Fri, Mar 24, 2017 at 8:44 PM, adam.c.bernier wrote: > On Friday, March 24, 2017 at 1:37:49 PM UTC-7, eryk sun wrote: > >> Without knowing the command you're running, all we can do is >> speculate. It could be that it's an application that uses a single >> instance, in which case running another

Re: Subprocess .wait() is not waiting

2017-03-24 Thread eryk sun
On Fri, Mar 24, 2017 at 8:24 PM, Ian Kelly wrote: > On Fri, Mar 24, 2017 at 2:09 PM, Chris Angelico wrote: > >> Errr been a while since I messed with Windows from memory, I >> think you can "start /wait programname" to make it wait?? Worth a try, >> at least. > > start /wait is for batch

Re: Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
On Friday, March 24, 2017 at 1:37:49 PM UTC-7, eryk sun wrote: > On Fri, Mar 24, 2017 at 6:42 PM, adam.c.bernier wrote: > > > > I am on Windows 7. Python 2.7 > > > > I'm trying to have a program run another program using `subprocess.Popen` > > > > import subprocess as sp > > > > args = shl

Re: Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
On Friday, March 24, 2017 at 1:09:49 PM UTC-7, Chris Angelico wrote: > On Sat, Mar 25, 2017 at 6:55 AM, adam.c.bernier wrote: > > On Friday, March 24, 2017 at 12:55:30 PM UTC-7, adam.c.bernier wrote: > >> On Friday, March 24, 2017 at 12:51:02 PM UTC-7, Chris Angelico wrote: > >> > On Sat, Mar 25,

Re: Subprocess .wait() is not waiting

2017-03-24 Thread eryk sun
On Fri, Mar 24, 2017 at 6:42 PM, adam.c.bernier wrote: > > I am on Windows 7. Python 2.7 > > I'm trying to have a program run another program using `subprocess.Popen` > > import subprocess as sp > > args = shlex.split(args) Is this command supposed to run cross-platform? If not, then spli

Re: Subprocess .wait() is not waiting

2017-03-24 Thread Ian Kelly
On Fri, Mar 24, 2017 at 2:09 PM, Chris Angelico wrote: > On Sat, Mar 25, 2017 at 6:55 AM, adam.c.bernier wrote: >> On Friday, March 24, 2017 at 12:55:30 PM UTC-7, adam.c.bernier wrote: >>> On Friday, March 24, 2017 at 12:51:02 PM UTC-7, Chris Angelico wrote: >>> > On Sat, Mar 25, 2017 at 6:40 AM,

Re: Subprocess .wait() is not waiting

2017-03-24 Thread Chris Angelico
On Sat, Mar 25, 2017 at 6:55 AM, adam.c.bernier wrote: > On Friday, March 24, 2017 at 12:55:30 PM UTC-7, adam.c.bernier wrote: >> On Friday, March 24, 2017 at 12:51:02 PM UTC-7, Chris Angelico wrote: >> > On Sat, Mar 25, 2017 at 6:40 AM, Ian Kelly wrote: >> > > If that's what's happening it would

Re: Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
On Friday, March 24, 2017 at 12:41:22 PM UTC-7, Ian wrote: > On Fri, Mar 24, 2017 at 12:42 PM, adam.c.bernier > wrote: > > Hi, > > > > I am on Windows 7. Python 2.7 > > > > I'm trying to have a program run another program using `subprocess.Popen` > > > > import subprocess as sp > > > > ar

Re: Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
On Friday, March 24, 2017 at 12:55:30 PM UTC-7, adam.c.bernier wrote: > On Friday, March 24, 2017 at 12:51:02 PM UTC-7, Chris Angelico wrote: > > On Sat, Mar 25, 2017 at 6:40 AM, Ian Kelly wrote: > > > If that's what's happening it would be a bug. Are you sure that the > > > other program isn't si

Re: Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
On Friday, March 24, 2017 at 12:51:02 PM UTC-7, Chris Angelico wrote: > On Sat, Mar 25, 2017 at 6:40 AM, Ian Kelly wrote: > > If that's what's happening it would be a bug. Are you sure that the > > other program isn't simply crashing or otherwise failing to complete? > > > > Or possibly is runnin

Re: Subprocess .wait() is not waiting

2017-03-24 Thread Chris Angelico
On Sat, Mar 25, 2017 at 6:40 AM, Ian Kelly wrote: > If that's what's happening it would be a bug. Are you sure that the > other program isn't simply crashing or otherwise failing to complete? > Or possibly is running asynchronously. Is this a GUI app? A lot of Windows GUI programs don't wait when

Re: Subprocess .wait() is not waiting

2017-03-24 Thread Ian Kelly
On Fri, Mar 24, 2017 at 12:42 PM, adam.c.bernier wrote: > Hi, > > I am on Windows 7. Python 2.7 > > I'm trying to have a program run another program using `subprocess.Popen` > > import subprocess as sp > > args = shlex.split(args) > proc = sp.Popen(args,stdout=sp.PIPE,stderr=sp.PIPE) >

Subprocess .wait() is not waiting

2017-03-24 Thread adam.c.bernier
Hi, I am on Windows 7. Python 2.7 I'm trying to have a program run another program using `subprocess.Popen` import subprocess as sp args = shlex.split(args) proc = sp.Popen(args,stdout=sp.PIPE,stderr=sp.PIPE) out, err = proc.communicate() proc.wait() But it *sometimes* does