From e916a84ee1217c1629bf69ebfdab7806b0e81b24 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Thu, 15 Dec 2016 10:36:10 +0100 Subject: [PATCH] Update linux.py --- src/fenrir/screenDriver/linux.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fenrir/screenDriver/linux.py b/src/fenrir/screenDriver/linux.py index ab74e22b..f0d4751b 100644 --- a/src/fenrir/screenDriver/linux.py +++ b/src/fenrir/screenDriver/linux.py @@ -28,8 +28,11 @@ class driver(): currScreenFile.close() except Exception as e: self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) - def injectTextToScreen(self, text): - with open("/dev/tty" + self.env['screenData']['newTTY'], 'w') as fd: + def injectTextToScreen(self, text, screen = None): + useScreen = "/dev/tty" + self.env['screenData']['newTTY'] + if screen != None: + useScreen = screen + with open(useScreen, 'w') as fd: for c in text: fcntl.ioctl(fd, termios.TIOCSTI, c) time.sleep(0.005)