<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>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?<br><br>Snippet (linux based at this time, please assume NodePath is a string and is correct):<br><br> config = ConfigParser.RawConfigParser()<br> TahoeCfg = NodePath + '/tahoe.cfg' <br> config.read(TahoeCfg)<br> config.set('node','nickname',GridName)<br> with open(TahoeCfg,'wb') as configfile:<br> config.write(configfile)<br><br>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?<br><br>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?<br> </div></body>
</html>