Skip to main content
Active reading.
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 109
  • 132

youYou can use Popen, and then you can check the procedure's status:

from subprocess import Popen

proc = Popen(['ls', '-l'])
if proc.poll() is None:
    proc.kill()

Check this out subprocess.Popen.

you can use Popen, then you can check procedure's status

from subprocess import Popen

proc = Popen(['ls', '-l'])
if proc.poll() is None:
    proc.kill()

Check this out subprocess.Popen

You can use Popen, and then you can check the procedure's status:

from subprocess import Popen

proc = Popen(['ls', '-l'])
if proc.poll() is None:
    proc.kill()

Check out subprocess.Popen.

Source Link

you can use Popen, then you can check procedure's status

from subprocess import Popen

proc = Popen(['ls', '-l'])
if proc.poll() is None:
    proc.kill()

Check this out subprocess.Popen