I have used this mechanism for years to detect that bracket highlight is installed:
def bracket_highlighter_installed():
global is_bracket_highlighter_installed
if is_bracket_highlighter_installed is None:
try:
import BracketHighlighter.bh_core as bh_core
except ImportError as e:
is_bracket_highlighter_installed = False
else:
is_bracket_highlighter_installed = True
print("Installed", is_bracket_highlighter_installed)
print("Path", sys.path)
return is_bracket_highlighter_installed
It no longer works. It prints an error
No module named 'BracketHighlighter'
I can run “import BracketHighlighter” in the python console window and it works just fine.
Has something changed?