aboutsummaryrefslogtreecommitdiff
path: root/lib/util.py
diff options
context:
space:
mode:
authorSkip Montanaro <[email protected]>2021-02-16 20:14:16 -0600
committerSkip Montanaro <[email protected]>2021-02-16 20:14:16 -0600
commitc2587c76f1b416cdbecb979e54941933246bf856 (patch)
treebb61ee9128075ce22af4eafa232f13c2e5a07896 /lib/util.py
parentd90761a005b24018ae237bf551515772a1de656f (diff)
downloadpython-0.9.1-patched-QoL-c2587c76f1b416cdbecb979e54941933246bf856.tar.xz
python-0.9.1-patched-QoL-c2587c76f1b416cdbecb979e54941933246bf856.zip
starting over
Diffstat (limited to 'lib/util.py')
-rw-r--r--lib/util.py24
1 files changed, 12 insertions, 12 deletions
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