Closed ussserrr closed 4 years ago
There is no easy way to preserve comments while handling the platformio.ini
via configparser
though it is a robust approach to be sure that all parameters will be written and will not be doubled. So let's sacrifice comments.
Instead of clumsily write a string with a patch to the
platformio.ini
we can use aconfigparser
module to modify the.ini
file. Note that it most likely erase all;
comments so we need to think about some workaround for this, maybe usedifflib
standard module to find all deltas.