From 2e95e3a33bcb34aeec66551503c692c1cb80ab61 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 9 Feb 2009 20:05:30 +0100 Subject: * all python: - changed tabs to spaces. --- host/proto/test/fio.py | 24 ++++++++++++------------ host/proto/test/interactive.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'host/proto/test') diff --git a/host/proto/test/fio.py b/host/proto/test/fio.py index 07646199..f520d41e 100644 --- a/host/proto/test/fio.py +++ b/host/proto/test/fio.py @@ -1,22 +1,22 @@ class IO: def __init__ (self, fin = None, fout = None): - if fin is None: - import sys, tty - self.fin = sys.stdin - self.fout = sys.stdout - tty.setcbreak (sys.stdin.fileno ()) - else: - self.fin = fin - self.fout = fout + if fin is None: + import sys, tty + self.fin = sys.stdin + self.fout = sys.stdout + tty.setcbreak (sys.stdin.fileno ()) + else: + self.fin = fin + self.fout = fout def read (self, *args): - buf = self.fin.read (*args).replace ('\n', '\r') - return buf + buf = self.fin.read (*args).replace ('\n', '\r') + return buf def write (self, *args): - return self.fout.write (*[i.replace ('\r', '\n') for i in args]) + return self.fout.write (*[i.replace ('\r', '\n') for i in args]) def fileno (self): - return self.fin.fileno () + return self.fin.fileno () diff --git a/host/proto/test/interactive.py b/host/proto/test/interactive.py index a8251f6d..d34d6d59 100644 --- a/host/proto/test/interactive.py +++ b/host/proto/test/interactive.py @@ -26,4 +26,4 @@ while True: p.sync () fds = select.select ((p,), (), (), 0.1)[0] for i in fds: - i.read () + i.read () -- cgit v1.2.3