From: Kurt B. Kaiser Date: Wed, 22 Aug 2007 21:34:28 +0000 (+0000) Subject: Replace file() with open() X-Git-Tag: v3.0a1~337 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a4dbaf8373b507430fb41f0744eef0cdd3df1b4;p=python Replace file() with open() --- diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py index 47eadb24d5..c84ec88c9e 100644 --- a/Lib/idlelib/ScriptBinding.py +++ b/Lib/idlelib/ScriptBinding.py @@ -82,7 +82,7 @@ class ScriptBinding: self.shell = shell = self.flist.open_shell() saved_stream = shell.get_warning_stream() shell.set_warning_stream(shell.stderr) - f = file(filename, 'r') + f = open(filename, 'r') source = f.read() f.close() if '\r' in source: