I want to have a directory structure like:
myplugin
-lib
-myplugin.py
-file.py
-another.py
-tests
-file_tests.py
-another_tests.py
I can’t make sublime recognize my plugin if it is in the child directory. That’s fine, I can keep the entry point in the root directory and import my other classes; however, I can’t make that work either. I’ve written the code and run my tests fine, like nosetest tests/
and everything passes - when sublime tries to load the package I get: ImportError: No module named 'lib'
. I’m new to both sublime plugin development and Python, but basically, my plugin is like:
import sublime
import sublime_plugin
from lib.something import Something
from lib.something_else import SomethingElse
from lib.something_else_else import SomethingElseElse
class MyPluginCommand(sublime_plugin.TextCommand):