def applyCallback(self, sender): if self.currentGlyph is not None: xml = self.w.xml.get() dummyGlyph = RGlyph() try: readGlyphFromString(str(xml), dummyGlyph, dummyGlyph.getPointPen()) except: import traceback error = "A problem occured when trying to parse the glif plist." suggestion = traceback.format_exc(5) self.showMessage(error, suggestion) return self.currentGlyph.clear() readGlyphFromString(str(xml), self.currentGlyph, self.currentGlyph.getPointPen())