def textpath(self, txt, x, y, width=None, height=None, **kwargs): if width is None: width = 0 if height is None: height = 0 p = CanvasContext.textpath(self, unicode(txt), x, y, width, height) self._setAttributesFromKwargs(p, **kwargs) return p