On Thu, Dec 13, 2007 at 09:31:03AM -0500, Darren Dale wrote: > It is possible to save the current settings to a file, so only those that > deviate from the default are written to the file. By putting the comments on > the same line as the data, you encourage users to comment their config files > accordingly, but comments appearing on the same line as the data will be > deleted if the current settings are saved. Also, what happens when the > comment is many lines long, like the comment for matplotlib's timezone > setting? I have a feeling there are formatting issues with this scheme.
> I think I prefer the existing behavior, where the comment appears on a > seperate line just before the data. Maybe I don't understand the point of > your modifications. If I type "options <Rtn>", I don't understand what kind of object I have. It looks like a string to me, and it is not obvious that it actually is an object that I can modify by accessing its attributes. Currently if I don't know what the object is, it is not obvious what to do with it. I don't like the current way it is print (in the repository), because it is too long, and looks too much like a string. I am not sure my option is great because of your remark, and because it still looks a lot like a string. Second try, how to you like this: In [1]: import simpleconf In [2]: simpleconf.SimpleConfig() Out[2]: <SimpleConfig configuration object at 138452492> |-> datafile: 'data.txt' (a value of type 'str' or a value of type 'unicode') |-> solver: 'Direct' ('Direct' or 'Iterative') |-> Protocol.max_users: 1 (a value of type 'int') |-> Protocol.ptype: 'http' ('http' or 'ftp' or 'ssh') This feels a bit more like a Python object. I am still not terribly happy with the way the options are presented. It is not obvious they are simply attributes. Gaƫl ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel