using subprocess.Popen + kill in indigo

Posted on
Wed Mar 26, 2014 8:21 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

using subprocess.Popen + kill in indigo

issue with p.terminate() in indigo python:

when starting a process with
p = subprocess.Popen( ....)

then trying to end the process with
p.kill() or p.terminate() gives an error message that p does not have the terminate method

It does not work in python 2.5
you need to use
os.kill( p.pid, signal.SIGKILL)

naturally one has to
import os, signal

The terminate method works in python 2.6 and higher

Just FYI incase you spend some hours trying to make this work..

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests

cron