started environment
This commit is contained in:
parent
89d585f0c2
commit
647e7f5f64
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Module for containing super important variables
|
||||||
|
|
||||||
|
|
||||||
|
class environment():
|
||||||
|
"""
|
||||||
|
Object containing all the important variables,
|
||||||
|
with appropriate getters and setters.
|
||||||
|
Also contains self integrity checks.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
# mandatoryParameters
|
||||||
|
self.mParams = {
|
||||||
|
'config': None,
|
||||||
|
'context_mngr': None,
|
||||||
|
'export_mngr': None,
|
||||||
|
'global_path': None,
|
||||||
|
'user_path': None,
|
||||||
|
'logging': None,
|
||||||
|
}
|
||||||
|
|
||||||
|
# secondaryParameters
|
||||||
|
self.sParams = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set all parameters to uninitialised
|
||||||
|
self.wasInitialised = {p: False for p in self.mParams}
|
||||||
|
|
||||||
|
def integritycheck(self):
|
||||||
|
for value in self.wasInitialised.values():
|
||||||
|
if value is False:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
Loading…
Reference in New Issue