Skip to content

Commit

Permalink
Make imports work when in .sublime-package
Browse files Browse the repository at this point in the history
  • Loading branch information
FichteFoll committed Jan 12, 2014
1 parent c179962 commit 2eca3cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AAA.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import sys

try: # ST3
from .Lib.sublime_lib.path import get_package_name, get_package_path
from .Lib.sublime_lib.path import get_package_name

PLUGIN_NAME = get_package_name()
libpath = os.path.join(get_package_path(), "Lib")
path = os.path.dirname(__file__)
libpath = os.path.join(path, "Lib")
except ValueError: # ST2
# For some reason the import does only work when RELOADING the plugin, not
# when ST is loading it initially.
Expand Down

0 comments on commit 2eca3cd

Please sign in to comment.