def save(self):
        self.xmlnode.set('id', self.id)
        self.xmlnode.set('name', self.id)
        colornode = self.xmlnode.find('%s/%s/%s' % (tag('technique_common'),
            tag('directional'), tag('color')))
        colornode.text = ' '.join(map(str, self.color))
Can be redefined to generate post event to exit the Ipython shell
dataset/ETHPy150Open pycollada/pycollada/collada/light.py/DirectionalLight.save--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/gui/wx/ipshell_nonblocking.py/NonBlockingIPShell._ask_exit