How/where to store calibration values - written by program A, read by program B

Chris Green cl at isbd.net
Wed Dec 6 04:45:21 EST 2023


Paul Rubin <no.email at nospam.invalid> wrote:
> Chris Green <cl at isbd.net> writes:
> > I could simply write the values to a file (or a database) and I
> > suspect that this may be the best answer but it does make retrieving
> > the values different from getting all other (nearly) constant values.
> 
> I've used configparser for this, though its intention is files that are
> manually edited, rather than updated by a program.
> 
> You can also read and dump a json file or pickle file.  I prefer json to
> pickle for most purposes these days.
> 
> I don't like YAML and I don't like the proliferation of markup formats
> of this type.  So while I don't know exactly what TOML is, I figure it
> must be bad.
> 
> I sometimes use ast.literal_eval though it is Python specific.
> 
That's interesting, I'll add it to my armoury anyway. :-)


> Of course there is also sqlite but that is probably overkill.

It's what my current code uses but does feel a bit OTT and it isn't
particularly convenient to view when debugging. 

-- 
Chris Green
·


More information about the Python-list mailing list