Brett wrote:
» Consider using ConfigObj since it does validation, type conversion and unicode automatically...the cons are that it adds another dependency and we would have to change the prefs interface throughout bauble«
what about, instead, removing prefs.py and just rely on ConfigParser?
this would not add type validation/conversion, but it would make the code base smaller, without adding any dependency (ConfigParser is part of Python 2.6 and 2.7 and we do not support earlier versions). I also guess it would have a positive impact on maintenance and readability.
we could later on add type conversion and data validation, by subclassing and without changing the way it's used.
Copied from original issue: mfrasca/bauble.classic#59
From @mfrasca on April 23, 2015 14:24
Brett wrote: » Consider using ConfigObj since it does validation, type conversion and unicode automatically...the cons are that it adds another dependency and we would have to change the prefs interface throughout bauble«
what about, instead, removing
prefs.py
and just rely on ConfigParser?this would not add type validation/conversion, but it would make the code base smaller, without adding any dependency (ConfigParser is part of Python 2.6 and 2.7 and we do not support earlier versions). I also guess it would have a positive impact on maintenance and readability.
we could later on add type conversion and data validation, by subclassing and without changing the way it's used.
Copied from original issue: mfrasca/bauble.classic#59