summaryrefslogtreecommitdiffstats
path: root/Lib/lib-stdwin
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-04-21 19:31:39 (GMT)
committerGuido van Rossum <guido@python.org>1991-04-21 19:31:39 (GMT)
commit40b0f3aa0e814ede1cce8447c53f475f667cb792 (patch)
tree954d5995c8628048d22d0e74553fcb5d5647eeb7 /Lib/lib-stdwin
parent001fa6a20f041c81a83ceec282f88211ec8c2079 (diff)
downloadcpython-40b0f3aa0e814ede1cce8447c53f475f667cb792.zip
cpython-40b0f3aa0e814ede1cce8447c53f475f667cb792.tar.gz
cpython-40b0f3aa0e814ede1cce8447c53f475f667cb792.tar.bz2
Use built-in file.read() instead of util.readfile().
Diffstat (limited to 'Lib/lib-stdwin')
-rw-r--r--Lib/lib-stdwin/filewin.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/lib-stdwin/filewin.py b/Lib/lib-stdwin/filewin.py
index 6a224e7..a03c3f7 100644
--- a/Lib/lib-stdwin/filewin.py
+++ b/Lib/lib-stdwin/filewin.py
@@ -2,17 +2,19 @@
# File windows, a subclass of textwin (which is a subclass of gwin)
import textwin
-from util import readfile
+import builtin
# FILE WINDOW
def open_readonly(fn): # Open a file window
- w = textwin.open_readonly(fn, readfile(fn))
+ fp = builtin.open(fn, 'r')
+ w = textwin.open_readonly(fn, fp.read())
w.fn = fn
return w
def open(fn): # Open a file window
- w = textwin.open(fn, readfile(fn))
+ fp = builtin.open(fn, 'r')
+ w = textwin.open(fn, fp.read())
w.fn = fn
return w