From d94c9ce31e175ccae2699436b783e8dbdffb2820 Mon Sep 17 00:00:00 2001 From: robgwinprn Date: Thu, 7 Nov 2013 16:04:52 -0800 Subject: [PATCH] patch from victzhang to fix issue #25 --- sourcecodebrowser.plugin | 2 +- sourcecodebrowser/__init__.py | 8 ++++++++ sourcecodebrowser/ctags.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sourcecodebrowser.plugin b/sourcecodebrowser.plugin index c929aca..f3945c1 100644 --- a/sourcecodebrowser.plugin +++ b/sourcecodebrowser.plugin @@ -1,5 +1,5 @@ [Plugin] -Loader=python +Loader=python3 Module=sourcecodebrowser IAge=3 Name=Source Code Browser diff --git a/sourcecodebrowser/__init__.py b/sourcecodebrowser/__init__.py index b302f1f..2b0d2fd 100644 --- a/sourcecodebrowser/__init__.py +++ b/sourcecodebrowser/__init__.py @@ -1,3 +1,11 @@ +import sys, os + +path = os.path.dirname(__file__) + +if not path in sys.path: + sys.path.insert(0, path) + import plugin from plugin import SourceCodeBrowserPlugin + diff --git a/sourcecodebrowser/ctags.py b/sourcecodebrowser/ctags.py index 7e978c6..15d188f 100644 --- a/sourcecodebrowser/ctags.py +++ b/sourcecodebrowser/ctags.py @@ -88,7 +88,7 @@ def parse(self, command, executable=None): #args = [arg.replace('%20', ' ') for arg in shlex.split(command)] args = shlex.split(command) p = subprocess.Popen(args, 0, shell=False, stdout=subprocess.PIPE, executable=executable) - symbols = self._parse_text(p.communicate()[0]) + symbols = self._parse_text(p.communicate()[0].decode("utf-8")) def _parse_text(self, text): """