PyConfigContainer#
- class PyConfigContainer#
Bases:
objectObject that can define attributes recursively on the fly.
Allows the config file syntax:
c.group.subgroup.parameter = 3 c.another_group.parameter = True
It patches
__getattribute__to allow this. Any unknown attribute is automatically created and assigned a new instance of PyConfigContainer. The attributes values can be explored (recursively) in the__dict__attribute.This is a very minimalist approach and caution should be applied if this class is to be expanded.