I’m trying to show a output_panel in the construct of the EventListener, I need to show a feedback to the user when the plugin is installing some dependencies (not a package) and the init construct seems to be the better place because it runs only once.
I’m doing something like this:
class PluginListener(sublime_plugin.EventListener):
def __init__(self):
name = "PluginName"
panel_name = 'output.' + name
panel = sublime.create_output_panel(name)
panel.set_name(name)
sublime.run_command("show_panel", {"panel": panel_name})
panel.set_read_only(False)
panel.run_command("append", {"characters": "Some Text"})
panel.set_read_only(True)
I’ve also tried creating an active windows first with sublime.active window()
but it doesn’t work either.
How should I do this?