I would see if you can accomplish what you want using augeas... it
already has lenses for cobbler's settings file.
I hadn't considered augeas, I usually associate that with ruby and
puppet only. I added a commit to that branch that now writes settings
via python-augeas.