Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python3 module equivalent for GtkSourceView2

I'm attempting a port of the abandoned Gedit plugin codecompletion to Python 3.

In the original code a Python 2 package is called:

import gtksourceview2 as gsv

and it is then inherited by a class to, presumably, perform completion:

class JSONProvider(gobject.GObject, gsv.CompletionProvider):
    MARK_NAME = 'JSONProviderCompletionMark'

    def __init__(self, plugin):
        gobject.GObject.__init__(self)
        ...

I've never used GtkSourceView or its completion functionality, so it's unclear what the inheritance is fulfilling. What is the equivalent gtksourceview2 (or 3) module in Python 3?

like image 674
venzen Avatar asked Dec 01 '25 04:12

venzen


1 Answers

The equivalent would be

from gi.repository import GtkSource
like image 129
ptomato Avatar answered Dec 02 '25 20:12

ptomato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!