wikiteam icon indicating copy to clipboard operation
wikiteam copied to clipboard

Save config with ConfigParser instead of cPickle

Open emijrp opened this issue 11 years ago • 4 comments

We use cPickle for saving/loading the config. But ConfigParser keeps it easy to edit in a more human-readable format.

Module doc: https://docs.python.org/2/library/configparser.html

emijrp avatar Jul 03 '14 14:07 emijrp

What is the advantage of ConfigParser over JSON?

PiRSquared17 avatar Mar 02 '15 04:03 PiRSquared17

Readability?

ricordisamoa avatar Mar 12 '15 01:03 ricordisamoa

cPickle is unreadable to me, but is ConfigParser really more readable than formatted JSON? I think a lot of custom parsing code would need to be added for ConfigParser, e.g. to divide it up into sections and implement comma, pipe, or space delimited lists (ConfigParser has no built-in list support).

PiRSquared17 avatar Mar 12 '15 01:03 PiRSquared17

ConfigParser has built-in support for sections. Lists would probably have to be implemented independently.

ricordisamoa avatar Mar 13 '15 00:03 ricordisamoa