Skip to content

Commit a506186

Browse files
SimonSapintoobaz
authored andcommitted
Port to Python 3 / Gedit 3.8
1 parent b009544 commit a506186

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

sourcecodebrowser.plugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Plugin]
2-
Loader=python
2+
Loader=python3
33
Module=sourcecodebrowser
44
IAge=3
55
Name=Source Code Browser

sourcecodebrowser/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
import plugin
2-
from plugin import SourceCodeBrowserPlugin
3-
1+
from . import plugin
2+
from .plugin import SourceCodeBrowserPlugin

sourcecodebrowser/ctags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def parse(self, command, executable=None):
8888
#args = [arg.replace('%20', ' ') for arg in shlex.split(command)]
8989
args = shlex.split(command)
9090
p = subprocess.Popen(args, 0, shell=False, stdout=subprocess.PIPE, executable=executable)
91-
symbols = self._parse_text(p.communicate()[0])
92-
91+
symbols = self._parse_text(p.communicate()[0].decode('utf8'))
92+
9393
def _parse_text(self, text):
9494
"""
9595
Parses ctags text which may have come from a TAG file or from raw output

sourcecodebrowser/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
import logging
44
import tempfile
5-
import ctags
5+
from . import ctags
66
from gi.repository import GObject, GdkPixbuf, Gedit, Gtk, PeasGtk, Gio
77

88
logging.basicConfig()

0 commit comments

Comments
 (0)