Package Biskit :: Module SettingsParser :: Class Setting
[hide private]
[frames] | no frames]

Class Setting

source code

Simple container for a single parameter

Instance Methods [hide private]
  __init__(self, name=None, value=None, vtype=str, comment=None, error=None, section=NORMAL)
  typeCast(self, vtype)
Recast value to a new type.
  __repr__(self, tab='')
  __str__(self)
int __cmp__(self, other)
Compare Setting instances by their name.
str formatted(self)
Returns parameter formatted for setting file

Class Variables [hide private]
  NORMAL = 'NORMAL'
  PATH = 'PATHS'
  BIN = 'BINARIES'

Method Details [hide private]

__init__(self, name=None, value=None, vtype=str, comment=None, error=None, section=NORMAL)
(Constructor)

source code 

typeCast(self, vtype)

source code 

Recast value to a new type. Value None remains unchanged.
Parameters:
  • vtype (type) - new type for value
Raises:
  • InvalidValue - if current value is incompatible with vtype

__repr__(self, tab='')
(Representation operator)

source code 

__str__(self)
(Informal representation operator)

source code 

__cmp__(self, other)
(Comparison operator)

source code 

Compare Setting instances by their name.
Returns: int
1,0,-1

formatted(self)

source code 
Returns: str
parameter formatted for setting file

Class Variable Details [hide private]

NORMAL

Value:
'NORMAL'                                                               
      

PATH

Value:
'PATHS'                                                                
      

BIN

Value:
'BINARIES'