Package zeroinstall :: Package injector :: Module model :: Class EnvironmentBinding
[frames] | no frames]

Class EnvironmentBinding

source code

object --+    
         |    
   Binding --+
             |
            EnvironmentBinding

Indicate the chosen implementation using an environment variable.

Instance Methods
 
__init__(self, name, insert, default=None, mode=PREPEND, value=None, separator=None)
mode argument added in version 0.28 value argument added in version 0.52
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
str(x)
source code
 
get_value(self, path, old_value)
Calculate the new value of the environment variable after applying this binding.
source code

Inherited from Binding: command

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

Class Variables
  PREPEND = 'prepend'
  APPEND = 'append'
  REPLACE = 'replace'
Properties

Inherited from object: __class__

Method Details

__init__(self, name, insert, default=None, mode=PREPEND, value=None, separator=None)
(Constructor)

source code 

mode argument added in version 0.28 value argument added in version 0.52

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

str(x)

Overrides: object.__repr__
(inherited documentation)

get_value(self, path, old_value)

source code 

Calculate the new value of the environment variable after applying this binding.

Parameters:
  • path - the path to the selected implementation
  • old_value - the current value of the environment variable
Returns:
the new value for the environment variable