From db34f34c6391e711950cdfd0f523e14204a5693d Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Sat, 11 Mar 2023 16:45:06 +0800 Subject: [PATCH] Fix import in package --- src/ToJyutping/ToJyutping.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ToJyutping/ToJyutping.py b/src/ToJyutping/ToJyutping.py index 858c353..ca17b35 100644 --- a/src/ToJyutping/ToJyutping.py +++ b/src/ToJyutping/ToJyutping.py @@ -1,7 +1,10 @@ from os import path import pygtrie import re -import utils +if __package__: + from . import utils +else: + import utils here = path.abspath(path.dirname(__file__))