diff --git a/src/fenrir/commands/commands/subprocess.py b/src/fenrir/commands/commands/subprocess.py new file mode 100644 index 00000000..183c52c9 --- /dev/null +++ b/src/fenrir/commands/commands/subprocess.py @@ -0,0 +1,29 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug +import subprocess, os + +class command(): + def __init__(self): + pass + def initialize(self, environment, scriptPaht=''): + self.env = environment + self.scriptPath = scriptPath + def shutdown(self): + pass + def getDescription(self): + return 'script: '+ self.scriptPath + def run(self): + p = Popen(self.scriptPath , stdout=PIPE, stderr=PIPE, shell=True) + stdout, stderr = p.communicate() + self.env['runtime']['outputManager'].interruptOutput() + if stderr != '': + self.env['runtime']['outputManager'].presentText(stdout , soundIcon='', interrupt=False) + if stdout != '' + self.env['runtime']['outputManager'].presentText(stdout , soundIcon='', interrupt=False) + def setCallback(self, callback): + pass diff --git a/src/fenrir/commands/onScreenChanged/10000-shut_up.py b/src/fenrir/commands/onScreenChanged/10000-shut_up.py index 6e18eb70..884c4264 100644 --- a/src/fenrir/commands/onScreenChanged/10000-shut_up.py +++ b/src/fenrir/commands/onScreenChanged/10000-shut_up.py @@ -17,7 +17,6 @@ class command(): return '' def run(self): - self.env['runtime']['outputManager'].interruptOutput() def setCallback(self, callback):