summaryrefslogtreecommitdiffstats
path: root/tester/rt/stty.py
diff options
context:
space:
mode:
Diffstat (limited to 'tester/rt/stty.py')
-rw-r--r--tester/rt/stty.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tester/rt/stty.py b/tester/rt/stty.py
index d059b40..1483d56 100644
--- a/tester/rt/stty.py
+++ b/tester/rt/stty.py
@@ -1,6 +1,6 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2013-2014 Chris Johns (chrisj@rtems.org)
+# Copyright 2013-2016 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -32,6 +32,8 @@
# RTEMS Testing Consoles
#
+from __future__ import print_function
+
import os
import sys
import termios
@@ -72,7 +74,7 @@ class tty:
raise error.general('dev not found: %s' % (dev))
try:
self.fd = open(dev, 'rw')
- except IOError, ioe:
+ except IOError as ioe:
raise error.general('opening tty dev: %s: %s' % (dev, ioe))
except:
raise error.general('opening tty dev: %s: unknown' % (dev))
@@ -558,9 +560,9 @@ if __name__ == "__main__":
t.control('CRTSCTS', False)
t.vmin(1)
t.vtime(2)
- print t
+ print(t)
t.set('B115200,~BRKINT,IGNBRK,IGNCR,~ICANON,~ISIG,~IEXTEN,~ECHO,CLOCAL,~CRTSCTS')
- print t
+ print(t)
t.on()
while True:
c = t.fd.read(1)