|
12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- from subprocess import *
- from threading import Thread
- import time
-
- class Modell(Thread):
-
- def __init__(self,c):
- Thread.__init__(self)
- self.controller = c
-
- def setFunktion(self, func, args=None, kwargs=None):
- pass
-
- def startCopySpelling(self):
- pass
-
- def trainXDawn(self):
- pass
-
- def trainClassifier(self):
- pass
-
- def freeSpelling(self):
- pass
-
- def killProzessParent(self):
- print('Parent start killing')
- pidOV = 0
- items = []
-
- prozesse = Popen(["ps", "-e"], stdout=PIPE).communicate()[0].strip()
- zeilen = prozesse.split('\n')
- for z in zeilen:
- if(z.find("openvibe-design") != -1):
- z = z.strip()
- items = z.split(' ')
- pidOV = items[0]
-
- #kill -TERM veranlasst dem Prozess sich selbst zu beenden (nicht erzwungen)
- Popen(["kill", "-TERM", str(pidOV)], stdout=PIPE).communicate()
-
-
- print("killed openvibe-designer")
|