Most Pythonic way to store (small) configuration

Jean-Michel Pichavant jeanmichel at
Tue Aug 4 11:11:34 CEST 2015

----- Original Message -----
> From: "Cecil Westerhof" <Cecil at>
> To: python-list at
> Sent: Sunday, 2 August, 2015 12:11:28 PM
> Subject: Most Pythonic way to store (small) configuration
> There are a lot of ways to store configuration information:
> - conf file
> - xml file
> - database
> - json file
> - and possible a lot of other ways
> I want to write a Python program to display cleaned log files. I do
> not think I need a lot of configuration to be stored:
> - some things relating to the GUI
> - default behaviour
> - default directory
> - log files to display, including some info
>   - At least until where it was displayed
> Because of this I think a human readable file would be best.
> Personally I do not find XML very readable. So a conf or json file
> looks the most promising to me. And I would have a slight preference
> for a json file.
> Any comments, thoughts or tips?
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn:
> --

Did you consider using "serpent" ?
It's a python serializer than can produce human readable text format.

If your configuration is a dictionary for instance, there's possibly no work to do.

see for yourself at :




The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

More information about the Python-list mailing list