RFC, new config mechanism??

A long time ago there was discussion about creating a plug-in system for pylib, and some code was written. Part of the difficulty was that the config file had to be radically altered. There was some discussion on how to do this, but no code actually go written in the end (which I had promised I would do). Finally having some free time again, I thought I would give it another shot. It should be fairly easy to move the plugin structure written once an appropriate config mechanism is in place.

Thus, on the suggestion of John, I started to write *just* a config module to replace the current one. The idea is mirror the current code, so '.matplotlibrc' files can still be used, but at the same time to also allow configuration files that are python code. This will allow all future extensions to easily be written in python, and allow easy backwards compatibility.

Attached is a quick and dirty first attempt. With very few lines of code it should be easy to import an old rc file. Let me know what you think.. It currently only has the config item 'tick.x', but if it looks worthwhile I can transfer the rest of the config items in, and write a function for reading in .matplotlibrc files.


config.py (5.75 KB)