Package SCons :: Package Variables :: Class Variables
[hide private]
[frames] | no frames]

Class Variables

source code

object --+
         |
        Variables

Instance Methods [hide private]
 
__init__(self, files=None, args=None, is_global=1)
automatically placed in a file list
source code
 
_do_add(self, key, help='', default=None, validator=None, converter=None) source code
 
keys(self)
Returns the keywords for the options
source code
 
Add(self, key, help='', default=None, validator=None, converter=None, **kw)
Add an option.
source code
 
AddVariables(self, *optlist)
Add a list of options.
source code
 
Update(self, env, args=None)
Update an environment with the option variables.
source code
 
UnknownVariables(self)
Returns any options in the specified arguments lists that were not known, declared options in this object.
source code
 
Save(self, filename, env)
Saves all the options in the given file. This file can then be used to load the options next run. This can be used to create an option cache file.
source code
 
GenerateHelpText(self, env, sort=None)
Generate the help text for the options.
source code
 
FormatVariableHelpText(self, env, key, help, default, actual, aliases=[]) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  instance = None
Holds all the options, updates the environment with the variables, and renders the help text.
  format = '\n%s: %s\n default: %s\n actual: %s\n'
  format_ = '\n%s: %s\n default: %s\n actual: %s\n alia...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, files=None, args=None, is_global=1)
(Constructor)

source code 
files - [optional] List of option configuration files to load
(backward compatibility) If a single string is passed it is
automatically placed in a file list
Overrides: object.__init__

Add(self, key, help='', default=None, validator=None, converter=None, **kw)

source code 

Add an option.

@param key: the name of the variable, or a list or tuple of arguments @param help: optional help text for the options @param default: optional default value @param validator: optional function that is called to validate the option's value @type validator: Called with (key, value, environment) @param converter: optional function that is called to convert the option's value before putting it in the environment.

AddVariables(self, *optlist)

source code 

Add a list of options.

Each list element is a tuple/list of arguments to be passed on to the underlying method for adding options.

Example:

opt.AddVariables(
('debug', '', 0),
('CC', 'The C compiler'),
('VALIDATE', 'An option for testing validation', 'notset',
 validator, None),
)

Update(self, env, args=None)

source code 

Update an environment with the option variables.

env - the environment to update.

Save(self, filename, env)

source code 

Saves all the options in the given file. This file can then be used to load the options next run. This can be used to create an option cache file.

filename - Name of the file to save into env - the environment get the option values from

GenerateHelpText(self, env, sort=None)

source code 

Generate the help text for the options.

env - an environment that is used to get the current values
of the options.
cmp - Either a function as follows: The specific sort function should take two arguments and return -1, 0 or 1
or a boolean to indicate if it should be sorted.

Class Variable Details [hide private]

format_

Value:
'''
%s: %s
    default: %s
    actual: %s
    aliases: %s
'''