From the application I cause one more program. Let's say so

import os os.system('gedit') 

Is it possible to track when the running program was closed? And proceed to the next.

  • subprocess - Subprocess management Moreover, os.system is an outdated call. - northerner
  • As an option to see if in the processes of, using a proc for example - johniek_comp
  • Thank you very much for the answers. I will google. - randomazer
  • one
    If os.system () in Python is a system () call from libc , then you don’t need to be tracked, it’s a synchronous function, it calls inside wait () . Another question is if the command you are launching through it will launch something in the background and complete it. - avp
  • one
    @avp, specifically, this is a wrapper for system() , declared obsolete (should not be used in new Python code:> Replacing os.system () sts = os.system ("mycmd" + "myarg") # becomes sts = call ("mycmd" + "myarg", shell = True) - northerner