From kde-devel Mon Aug 29 13:40:20 2005 From: elho Date: Mon, 29 Aug 2005 13:40:20 +0000 To: kde-devel Subject: kate plugin / KTextEditor Message-Id: <43131044.5050506 () delair ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=112532284826751 I would like to use the kate plugin (KTextEditor) with python. I translate from C++ where it works with 'Kate'. But in python it doesn't. What have I done wrong? Problem is the last line: editor = (KParts.Factory(factory)).createPart(self,'', None, '', "KTextEditor/Editor") # ...after that editor is 'NoneType' in C++ it was: editor = static_cast(factory->createPart(NULL, 0, 0, 0, "KTextEditor/Editor")); --------------------------------------------------------------------------- offers = KTrader.self().query("text/html") if len(offers) > 0 : for itKService in offers: if itKService.name() == "Embedded Advanced Text Editor" : ptr = itKService if ptr != None: strNameFile = "%s" % (QFile.encodeName(ptr.library())) factory = KLibLoader.self().factory(strNameFile) # returns (KLibFactory) editor = (KParts.Factory(factory)).createPart(self,'', None, '', "KTextEditor/Editor") --------------------------------------------------------------------------- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<