[Scons-users] What is the difference between Variables and Options

Stefan Seefeld stefan at seefeld.name
Sat Jan 2 13:33:14 EST 2016


On 02.01.2016 12:55, William Blevins wrote:
> Stefan,
>
> SCons parses commandline arguments in multiple stages, so the
> commandline gets parsed multiple times by various parsers. I don't
> remember the exact logic, but options and variables are disjoint concepts.

Fine, that matches my understanding.

>
> The SCons Option implementation is simply a wrapper around optparse
> (which will get replaced by argparse in the future).
> The SCons variable implementation is simply a pair-wise key:value
> ordering of non-option tokens.

>
> If you want to add variables to the help, then you may have to
> interact with OptParse more directly.

I had to struggle with this for a while, as the different bits of
information I gathered seemed to contradict each other. Now I think I
can make some sense out of this, assuming that the "Options()" function
I was originally trying to use has in fact nothing to do with the
"options" discussed above as conceptually different from "variables".
Perhaps "Options()" is even deprecated in favour of "Variables()"
precisely due to this potential confusion I just ran into. Am I right ?

Thanks,
        Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Scons-users mailing list