From: stevenknight Date: Tue, 23 Sep 2008 00:50:43 +0000 (+0000) Subject: Issue 2215: add a file() builtin to the compatability layer X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b997159114414f945c6581be1f348994534a5a91;p=scons.git 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 --- 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