![]() |
The Gaudi Framework
v27r0
|


Public Member Functions | |
| def | __init__ |
| def | vars |
| def | var (self, name) |
| def | search |
| def | declare (self, name, vartype, local) |
| def | append (self, name, value) |
| def | prepend (self, name, value) |
| def | set (self, name, value) |
| def | default (self, name, value) |
| def | unset |
| def | remove |
| def | remove_regexp (self, name, value) |
| def | searchFile (self, filename, varName) |
| def | loadXML |
| def | startXMLinput (self) |
| def | finishXMLinput |
| def | writeToFile |
| def | writeToXMLFile (self, fileName) |
| def | presetFromSystem (self) |
| def | process (self) |
| def | __getitem__ (self, key) |
| def | __setitem__ (self, key, value) |
| def | __delitem__ (self, key) |
| def | __iter__ (self) |
| def | __contains__ (self, item) |
| def | __len__ (self) |
Public Attributes | |
| log | |
| separator | |
| searchPath | |
| actions | |
| variables | |
| loadFromSystem | |
| asWriter | |
| writer | |
| loadedFiles | |
Private Member Functions | |
| def | _locate |
| def | _guessType (self, varname) |
| def | _concatenate (self, value) |
| def | _writeVarToXML |
Private Attributes | |
| _fileDirStack | |
object to hold settings of environment
Definition at line 13 of file Control.py.
| def EnvConfig.Control.Environment.__init__ | ( | self, | |
loadFromSystem = True, |
|||
useAsWriter = False, |
|||
searchPath = None |
|||
| ) |
Initial variables to be pushed and setup append switch between append and prepend for initial variables. loadFromSystem causes variable`s system value to be loaded on first encounter. If useAsWriter == True than every change to variables is recorded to XML file. reportLevel sets the level of messaging.
Definition at line 16 of file Control.py.
| def EnvConfig.Control.Environment.__contains__ | ( | self, | |
| item | |||
| ) |
Definition at line 376 of file Control.py.
| def EnvConfig.Control.Environment.__delitem__ | ( | self, | |
| key | |||
| ) |
Definition at line 369 of file Control.py.
| def EnvConfig.Control.Environment.__getitem__ | ( | self, | |
| key | |||
| ) |
Definition at line 360 of file Control.py.
| def EnvConfig.Control.Environment.__iter__ | ( | self | ) |
Definition at line 372 of file Control.py.
| def EnvConfig.Control.Environment.__len__ | ( | self | ) |
Definition at line 379 of file Control.py.
| def EnvConfig.Control.Environment.__setitem__ | ( | self, | |
| key, | |||
| value | |||
| ) |
Definition at line 363 of file Control.py.
|
private |
Returns a variable string with separator separator from the values list
Definition at line 344 of file Control.py.
|
private |
Guess the type of the variable from its name: if the name contains 'PATH' or 'DIRS', then the variable is a list, otherwise it is a scalar.
Definition at line 136 of file Control.py.
|
private |
|
private |
| def EnvConfig.Control.Environment.append | ( | self, | |
| name, | |||
| value | |||
| ) |
Appends to an existing variable.
Definition at line 181 of file Control.py.
| def EnvConfig.Control.Environment.declare | ( | self, | |
| name, | |||
| vartype, | |||
| local | |||
| ) |
Creates an instance of new variable. It loads values from the OS if the variable is not local.
Definition at line 147 of file Control.py.
| def EnvConfig.Control.Environment.default | ( | self, | |
| name, | |||
| value | |||
| ) |
Sets a single variable only if it is not already set!
Definition at line 209 of file Control.py.
| def EnvConfig.Control.Environment.finishXMLinput | ( | self, | |
outputFile = '' |
|||
| ) |
| def EnvConfig.Control.Environment.loadXML | ( | self, | |
fileName = None, |
|||
namespace = 'EnvSchema' |
|||
| ) |
Loads XML file for input variables.
Definition at line 260 of file Control.py.
| def EnvConfig.Control.Environment.prepend | ( | self, | |
| name, | |||
| value | |||
| ) |
Prepends to an existing variable, or create a new one.
Definition at line 190 of file Control.py.
| def EnvConfig.Control.Environment.presetFromSystem | ( | self | ) |
| def EnvConfig.Control.Environment.process | ( | self | ) |
| def EnvConfig.Control.Environment.remove | ( | self, | |
| name, | |||
| value, | |||
regexp = False |
|||
| ) |
Remove value from variable.
Definition at line 241 of file Control.py.
| def EnvConfig.Control.Environment.remove_regexp | ( | self, | |
| name, | |||
| value | |||
| ) |
Definition at line 250 of file Control.py.
| def EnvConfig.Control.Environment.search | ( | self, | |
| varName, | |||
| expr, | |||
regExp = False |
|||
| ) |
| def EnvConfig.Control.Environment.searchFile | ( | self, | |
| filename, | |||
| varName | |||
| ) |
Searches for appearance of variable in a file.
Definition at line 254 of file Control.py.
| def EnvConfig.Control.Environment.set | ( | self, | |
| name, | |||
| value | |||
| ) |
Sets a single variable - overrides any previous value!
Definition at line 199 of file Control.py.
| def EnvConfig.Control.Environment.startXMLinput | ( | self | ) |
| def EnvConfig.Control.Environment.unset | ( | self, | |
| name, | |||
value = None |
|||
| ) |
Unsets a single variable to an empty value - overrides any previous value!
Definition at line 233 of file Control.py.
| def EnvConfig.Control.Environment.var | ( | self, | |
| name | |||
| ) |
Gets a single variable. If not available then tries to load from system.
Definition at line 125 of file Control.py.
| def EnvConfig.Control.Environment.vars | ( | self, | |
strings = True |
|||
| ) |
returns dictionary of all variables optionally converted to string
Definition at line 112 of file Control.py.
| def EnvConfig.Control.Environment.writeToFile | ( | self, | |
| fileName, | |||
shell = 'sh' |
|||
| ) |
Creates an output file with a specified name to be used for setting variables by sourcing this file
Definition at line 295 of file Control.py.
| def EnvConfig.Control.Environment.writeToXMLFile | ( | self, | |
| fileName | |||
| ) |
Writes the current state of environment to a XML file. NOTE: There is no trace of actions taken, variables are written with a set action only.
Definition at line 318 of file Control.py.
|
private |
Definition at line 65 of file Control.py.
| EnvConfig.Control.Environment.actions |
Definition at line 42 of file Control.py.
| EnvConfig.Control.Environment.asWriter |
Definition at line 57 of file Control.py.
| EnvConfig.Control.Environment.loadedFiles |
Definition at line 62 of file Control.py.
| EnvConfig.Control.Environment.loadFromSystem |
Definition at line 56 of file Control.py.
| EnvConfig.Control.Environment.log |
Definition at line 24 of file Control.py.
| EnvConfig.Control.Environment.searchPath |
Definition at line 30 of file Control.py.
| EnvConfig.Control.Environment.separator |
Definition at line 26 of file Control.py.
| EnvConfig.Control.Environment.variables |
Definition at line 54 of file Control.py.
| EnvConfig.Control.Environment.writer |
Definition at line 59 of file Control.py.