From c2587c76f1b416cdbecb979e54941933246bf856 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Tue, 16 Feb 2021 20:14:16 -0600 Subject: starting over --- lib/util.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/util.py') diff --git a/lib/util.py b/lib/util.py index 0b7778f..7a9caf7 100644 --- a/lib/util.py +++ b/lib/util.py @@ -6,25 +6,25 @@ # If it occurs more than once, remove the first occurrence. # def remove(item, list): - for i in range(len(list)): - if list[i] = item: - del list[i] - break + for i in range(len(list)): + if list[i] = item: + del list[i] + break # Return a string containing a file's contents. # def readfile(fn): - return readopenfile(open(fn, 'r')) + return readopenfile(open(fn, 'r')) # Read an open file until EOF. # def readopenfile(fp): - BUFSIZE = 512*8 - data = '' - while 1: - buf = fp.read(BUFSIZE) - if not buf: break - data = data + buf - return data + BUFSIZE = 512*8 + data = '' + while 1: + buf = fp.read(BUFSIZE) + if not buf: break + data = data + buf + return data -- cgit v1.2.3