When trying to dynamically load several (possibly unknown) classes using something like:
for i in os.listdir(os.path.join(os.path.dirname(__file__),'extensions')):
if '.py' in i:
i = os.path.basename(os.path.splitext(i)[0])
import_module('Urtext.urtext.extensions.'+i)
I get an error like:
NotADirectoryError: [Errno 20] Not a directory: '/Users/username/Library/Application Support/Sublime Text/Installed Packages/Urtext.sublime-package/urtext/extensions
It looks like this kind of import will not work when bundled as a .sublime-package. Is there a recommended alternative?