Oleg,

If all you're looking to do is have foo in the shell environment of the 
commands you run, then you don't need to use Variables at all.
If you want to pass foo on the scons command line and have that affect the 
Environment(), though not the shell environment unless you explicitly copy the 
value:
env=Environment()
env['ENV']['foo']=env['foo']
Then Variables is useful.

Sounds like you really need to do a thorough read of the users guide and the 
man page.

-Bill

On Oct 5, 2012, at 9:42 AM, "Kenny, Jason L" <[email protected]> wrote:

> Variable objects are a defined type that allow for some basic validation, and 
> conversion. With Variables you can control logic for example on how to deal 
> with unknown values. This was meant to be an improvement over just taking the 
> arguments and passing them in to the Environment.  
> 
> Jason
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of Left Right
> Sent: Friday, October 05, 2012 11:14 AM
> To: [email protected]
> Subject: Re: [Scons-dev] How to get variables passed to Env(variables = 
> whatever)?
> 
> Nope, it doesn't. It was a typo, in the original code it was Environment, not 
> Env.
> I can, however, do it like so:
> 
> env = Environment(ENV = { 'foo' : 42 })
> env['ENV']['foo'] <--- this works then
> 
> But was curious of the reason why not allow to do it via Variables?
> 
> Thanks.
> 
> Oleg
> _______________________________________________
> Scons-dev mailing list
> [email protected]
> http://two.pairlist.net/mailman/listinfo/scons-dev
> _______________________________________________
> Scons-dev mailing list
> [email protected]
> http://two.pairlist.net/mailman/listinfo/scons-dev

_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to