diff options
author | Guido van Rossum <guido@python.org> | 1991-04-21 19:31:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-04-21 19:31:39 (GMT) |
commit | 40b0f3aa0e814ede1cce8447c53f475f667cb792 (patch) | |
tree | 954d5995c8628048d22d0e74553fcb5d5647eeb7 /Lib/stdwin | |
parent | 001fa6a20f041c81a83ceec282f88211ec8c2079 (diff) | |
download | cpython-40b0f3aa0e814ede1cce8447c53f475f667cb792.zip cpython-40b0f3aa0e814ede1cce8447c53f475f667cb792.tar.gz cpython-40b0f3aa0e814ede1cce8447c53f475f667cb792.tar.bz2 |
Use built-in file.read() instead of util.readfile().
Diffstat (limited to 'Lib/stdwin')
-rwxr-xr-x | Lib/stdwin/filewin.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/stdwin/filewin.py b/Lib/stdwin/filewin.py index 6a224e7..a03c3f7 100755 --- a/Lib/stdwin/filewin.py +++ b/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 |