Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

ConfigObj add new lines in conf file

$
0
0

Im working on a .conf file using python's ConfigObj to modify certain values.

I am able to successfully edit preconfigured key-value pair's using the command

config['wrapper.working.dir'] = 'test'

And the value changes , but now i want to add a completely new lineAnd not at the end of the file.

To be exact , i have the following line id like to add in the MIDDLE of the file

wrapper.java.additional.8=-Dcom.sun.management.jmxremote

which means , i want to have the following setup

wrapper.java.additional.7=-Dorg.apache.activemq.UseDedicatedTaskRunner=truewrapper.java.additional.8=-Dcom.sun.management.jmxremotewrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties

Cheers !


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>