summaryrefslogtreecommitdiffstats
path: root/Lib/multifile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
commitb6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af (patch)
tree9362939305b2d088b8f19a530c9015d886bc2801 /Lib/multifile.py
parent2979b01ff88ac4c5b316d9bf98edbaaaffac8e24 (diff)
downloadcpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.zip
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.gz
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.bz2
Merge alpha100 branch back to main trunk
Diffstat (limited to 'Lib/multifile.py')
-rw-r--r--Lib/multifile.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/multifile.py b/Lib/multifile.py
index 7a52ab6..71e0dd0 100644
--- a/Lib/multifile.py
+++ b/Lib/multifile.py
@@ -85,6 +85,17 @@ class MultiFile:
err('*** Missing endmarker in MultiFile.readline()\n')
return ''
#
+ def readlines(self):
+ list = []
+ while 1:
+ line = self.readline()
+ if not line: break
+ list.append(line)
+ return list
+ #
+ def read(self): # Note: no size argument -- read until EOF only!
+ return string.joinfields(self.readlines(), '')
+ #
def next(self):
while self.readline(): pass
if self.level > 1 or self.last: