def getMathMl(self, field): try: import mathType except: raise LookupError("MathType not installed") try: # Don't call RunForConversion, as this seems to make focus bounce. # We don't seem to need it for PowerPoint anyway. return mathType.getMathMl(field["oleFormat"], runForConversion=False) except: raise LookupError("Couldn't get MathML from MathType")
def _get_mathMl(self): try: import mathType except: raise LookupError("MathType not installed") obj = self.ppObject.OLEFormat try: # Don't call RunForConversion, as this seems to make focus bounce. # We don't seem to need it for PowerPoint anyway. return mathType.getMathMl(obj, runForConversion=False) except: raise LookupError("Couldn't get MathML from MathType")