|
From: Thomas Sturges-A. <zi...@ho...> - 2011-10-26 22:16:32
|
Sorry to spam, but i'm guessing this can be answered easily.
Was really glad to discover the configobj module as I had previously been restricted by ConfigParser.
The only important feature I have yet to find is an equivalent of " configfile.has_section('Blah') " and " configfile.has_option ('Section1', 'Option1') " which are listed here: http://docs.python.org/library/configparser.html?highlight=config%20parser#configparser-objects . Do such things exist?
I guess I could use ConfigParser as well just for this feature but it would not support nested sections. I had a fiddle with exceptions in classes as a way of making a feature myself but I can't seem to get it to work for KeyError exceptions (i.e. they crash the interpreter anyway). The validation system is not practical in this instance as what will be checked and what it will be checked for is reasonably dynamic.
I am using Python 2.72 and configobj 7.72 on Windows XP with Notepad ++
Thanks!
Thomas Sturges-Allardhttp://zig13.termisoc.org |