From 261cbb2165d4ad07d7f026c2ca02a6b819bfd518 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 19 Feb 1991 13:02:13 +0000 Subject: [PATCH] Use readfile from util.py. --- Lib/lib-stdwin/filewin.py | 15 +-------------- Lib/stdwin/filewin.py | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/Lib/lib-stdwin/filewin.py b/Lib/lib-stdwin/filewin.py index 1beb0b6520c..6a224e7c0a4 100644 --- a/Lib/lib-stdwin/filewin.py +++ b/Lib/lib-stdwin/filewin.py @@ -1,21 +1,8 @@ # Module 'filewin' # File windows, a subclass of textwin (which is a subclass of gwin) -import stdwin import textwin -import path - -builtin_open = open - -def readfile(fn): # Return a string containing the file's contents - fp = builtin_open(fn, 'r') - a = '' - n = 8096 - while 1: - b = fp.read(n) - if not b: break - a = a + b - return a +from util import readfile # FILE WINDOW diff --git a/Lib/stdwin/filewin.py b/Lib/stdwin/filewin.py index 1beb0b6520c..6a224e7c0a4 100755 --- a/Lib/stdwin/filewin.py +++ b/Lib/stdwin/filewin.py @@ -1,21 +1,8 @@ # Module 'filewin' # File windows, a subclass of textwin (which is a subclass of gwin) -import stdwin import textwin -import path - -builtin_open = open - -def readfile(fn): # Return a string containing the file's contents - fp = builtin_open(fn, 'r') - a = '' - n = 8096 - while 1: - b = fp.read(n) - if not b: break - a = a + b - return a +from util import readfile # FILE WINDOW