Sublime Forum

Determine type of an valid plugin module

#1
  1. Install 3.8 plugin SublimeLinter
  2. Install 3.3 plugin CommandsBrowser33
  3. Install 3.3 plugin Terminus
  4. Restart sublime text, watch console:
reloading plugin SublimeLinter._init
reloading python 3.3 plugin CommandsBrowser33.browse
reloading python 3.3 plugin Terminus.main
  1. Try importing:
>>> import SublimeLinter
>>> import CommandsBrowser33
>>> import Terminus
Traceback (most recent call last):
  File "__main__", line 1, in <module>
ModuleNotFoundError: No module named 'Terminus'

So why this makes different (that I cannot import terminus), is there any key files missing in these plugins?
Related:

  1. https://github.com/sublimelsp/LSP-rust-analyzer/blob/71a2ae721a3943ee3ac855f40598c0f94b8e0381/plugin.py#L25
  2. https://github.com/sublimelsp/LSP-rust-analyzer/blob/71a2ae721a3943ee3ac855f40598c0f94b8e0381/plugin.py#L98
  3. https://github.com/sublimelsp/LSP-rust-analyzer/issues/129#issuecomment-2093834477
0 Likes

#2

reloading python 3.3 plugin Terminus.main

Because it’s loaded in py33 plugin host rather than py38, which ST’s default console.
You have to switch to py33 console if you want to import it. Just right click in the console input.
image

0 Likes

#3

So obviously Terminus is moving toward py38 https://github.com/randy3k/Terminus/commit/6294ecdf08b5c9499fcc9d4aa20a78183e59d89e but this commit has not been included in the latest release yet.

1 Like

#4

Thanks, now I noticed that the 3.3 plugin CommandsBrowser33 is … probably “bridged” by this (without further explorer though):

reloading plugin CommandsBrowser.commands_browser

So, this may make me confusing that time:grinning:

0 Likes