]> granicus.if.org Git - python/commitdiff
Replace file() with open()
authorKurt B. Kaiser <kbk@shore.net>
Wed, 22 Aug 2007 21:34:28 +0000 (21:34 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Wed, 22 Aug 2007 21:34:28 +0000 (21:34 +0000)
Lib/idlelib/ScriptBinding.py

index 47eadb24d5c8c31a34a94c0c0a9ccc03bbd640a4..c84ec88c9ea3845c0d930ff7b909847aa9a99c45 100644 (file)
@@ -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: