[Scons-users] Substitutions

Paweł Tomulik ptomulik at meil.pw.edu.pl
Sun Aug 30 15:31:57 EDT 2015


The scons manpage (http://www.scons.org/doc/HTML/scons-man.html) states:


"""
Python Code Substitution

Any python code within ${-} pairs gets evaluated by python 'eval', with
the python globals set to the current environment's set of construction
variables
"""

I've just checked and it seems like the variables are in locals() not
globals(). For example, this returns "TRUE" (if env['TARGET'] is set):


'${"TARGET" in locals() and "TRUE" or "FALSE"}'


and this returns false:

'${"TARGET" in globals() and "TRUE" or "FALSE"}'


Could it be clarified? Do the Environment variables go to globals
(meaning globals()) or locals()?


-- 
Pawel Tomulik


More information about the Scons-users mailing list