I've been attempting to start a basic menu system to build grids (test first, then production), and when I try the ConfigParser write method, all of the commented out entries in the tahoe.cfg are removed... I know I'm new to python, so what am I missing?
Snippet (linux based at this time, please assume NodePath is a string and is correct): config = ConfigParser.RawConfigParser() TahoeCfg = NodePath + '/tahoe.cfg' config.read(TahoeCfg) config.set('node','nickname',GridName) with open(TahoeCfg,'wb') as configfile: config.write(configfile) After that config.write, whether I use RawConfigParser() or SafeConfigParser(), all of the commented out entries that used to be there are wiped out, which I obviously don't want to do. How can I avoid that artifact? P.S. is it better to put the menu code inline in a message, attach it, or post it somewhere and put in a link?
_______________________________________________ tahoe-dev mailing list tahoe-dev@tahoe-lafs.org https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev