run script threaded

This commit is contained in:
chrys 2016-10-19 14:59:34 +02:00
parent 707b120cba
commit 8067702858
2 changed files with 6 additions and 2 deletions

4
TODO
View File

@ -1,9 +1,9 @@
ToDos in Priority order:
- Known Bugs
Fenrir key sometimes wents crazy?
Fenrir key sometimes wents crazy? (maybe this is if fenrir key is released before other keys)
gstreamer sounddriver doesnt work (i think it needs a Glib
alpine seems to have problems (southernprince)
alpine seems to have problems (just small glitches) (southernprince)
For example, in screen, it just tells me bell in window, but doesn't tell me which one. (southernprince)
punctuation none currently not working (southernprince)
in special cases next word skipps a word, this seems to happen with some whitespaces before the first word (storm_dragon)

View File

@ -7,6 +7,7 @@
from core import debug
import subprocess, os
from subprocess import Popen, PIPE
import _thread
class command():
def __init__(self):
@ -28,6 +29,9 @@ class command():
if not os.access(self.scriptPath, os.X_OK):
self.env['runtime']['outputManager'].presentText('scriptfile is not executable' , soundIcon='', interrupt=False)
return
_thread.start_new_thread(self._threadRun , ())
def _threadRun(self):
try:
p = Popen(self.scriptPath , stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()