|
From: Stefan P. <pa...@ik...> - 2010-12-13 08:56:24
|
Hi, I'm writing a graphical editor for configuration files that work with configobj. I would like the GUI to take into account what type an option has, e.g. if it's an integer with a minimum and a maximum specified a slider should be shown while a standard text box is shown if no limits are given. The problem is getting the parameters, such as "min" and "max". I know I can parse the spec using ConfigObj and then do a lookup based on the option name, but that only results in a string like "integer(default=3, min=0, max=5)" which I would then have to parse further. Does validate.py provide any help with this or do I need to do the parsing myself. I realize that somewhere deep down inside validate the values are parsed, but are they exposed to users in any way? |