From b997159114414f945c6581be1f348994534a5a91 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 23 Sep 2008 00:50:43 +0000 Subject: [PATCH] Issue 2215: add a file() builtin to the compatability layer (for pre-2.2 Python versions). git-svn-id: http://scons.tigris.org/svn/scons/trunk@3457 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/compat/builtins.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/SCons/compat/builtins.py b/src/engine/SCons/compat/builtins.py index a4c3080c..abac8576 100644 --- a/src/engine/SCons/compat/builtins.py +++ b/src/engine/SCons/compat/builtins.py @@ -135,6 +135,12 @@ except NameError: # Assign to True in this module namespace so it shows up in pydoc output. True = True +try: + file +except NameError: + # Pre-2.2 Python has no file() function. + __builtin__.file = open + # try: zip -- 2.26.2