fp.write('\n')
filename = '/tmp/testconfig'
with open(filename, 'w') as f:
    parser = MyConfigParser()
parser.add_section('test')
parser.set('test', 'option', 'Spam spam spam!')
parser.set('test', 'more options', "Really? I can't believe it's not butter!")
parser.write(f)
Using colons in ConfigParser Python