Skip to content

Commit

Permalink
Manage to get the corrent path of the good_tailor module
Browse files Browse the repository at this point in the history
  • Loading branch information
nlpsuge committed Aug 9, 2020
1 parent ee71a25 commit 1d805d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/gt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import sys
import os
from pathlib import Path

cwd = os.getcwd()
current_file_path = os.path.dirname(os.path.realpath(__file__))
# Load good_tailor module
# Python 3.5+
file_path = Path(cwd, "good_tailor", "__init__.py")
file_path = Path(current_file_path, "..", "good_tailor", "__init__.py")
module_name = "good_tailor"
spec = importlib.util.spec_from_file_location(module_name, file_path)
good_tailor = importlib.util.module_from_spec(spec)
Expand Down

0 comments on commit 1d805d8

Please sign in to comment.