Subprocess .wait() is not waiting
adam.c.bernier at kp.org
Fri Mar 24 16:35:14 EDT 2017
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 <adam.c.bernier at kp.org> 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 <ian.g.kelly at gmail.com> 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 you invoke them.
> >> >
> >> > ChrisA
> >> Aha! Since the Excel app is a GUI app it's not waiting is that right?
> > If that's the case is there any workaround?
> 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.
> Otherwise, your best bet would be to wait in a completely different
> way. Give the app a specific file name to use as a signal, and when
> it's done, it should create that file. You then watch for that file,
> and when it exists, you move on.
Thank you! I will try the first answer here http://stackoverflow.com/questions/11615455/python-start-new-command-prompt-on-windows-and-wait-for-it-finish-exit and see where that gets me. Thanks again for your thoughts.
More information about the Python-list