def load(): import sys from enso.contrib.scriptotron.ensoapi import EnsoApi sys.path.append(EnsoApi().get_enso_commands_folder()) ScriptTracker.install( EventManager.get(), CommandManager.get() )
def post_enso_commands_write_category(value): category_file = os.path.join(config.ENSO_USER_DIR, "commands", value + ".py") with open(category_file, "wb") as cat: cat.write(request.form["code"].encode("utf-8")) ScriptTracker.get().setPendingChanges() return ""
def cmd_enso(ensoapi, action): """ Enso system command <b>Actions:</b><br>  - quit - quit Enso<br>  - restart - restart Enso<br>  - refresh - reload shortcuts available for the 'open' command<br>  - settings - open Enso settings page<br>  - commands - open Enso command list<br>  - tasks - open Enso task editor<br>  - editor - open Enso command editor<br>  - about - show application information<br> """ if action == 'quit': if not retreat.is_locked(): EventManager.get().stop() else: displayMessage(config.BLOCKED_BY_RETREAT_MSG) elif action == 'restart': if not retreat.is_locked(): EventManager.get().stop() subprocess.Popen( [config.ENSO_EXECUTABLE, "--restart " + str(os.getpid())]) else: displayMessage(config.BLOCKED_BY_RETREAT_MSG) elif action == 'refresh': Shortcuts.get().refreshShortcuts() ScriptTracker.get()._reloadPyScripts() displayMessage(config.REFRESHING_MSG_XML) elif action == 'settings': if config.ENABLE_WEB_UI: os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/options.html") elif action == 'commands': if config.ENABLE_WEB_UI: os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/commands.html") elif action == 'tasks': if config.ENABLE_WEB_UI: os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/tasks.html") elif action == 'editor': if config.ENABLE_WEB_UI: os.startfile("http://" + webui.HOST + ":" + str(webui.PORT) + "/edit.html") elif action == 'about': displayMessage(enso.config.ABOUT_BOX_XML)
def load(): ScriptTracker.install(EventManager.get(), CommandManager.get())
def load(): sys.path.append(EnsoApi().get_enso_commands_folder()) ScriptTracker.install(EventManager.get(), CommandManager.get())
def load(): import sys from enso.contrib.scriptotron.ensoapi import EnsoApi sys.path.append(EnsoApi().get_enso_commands_folder()) ScriptTracker.install(EventManager.get(), CommandManager.get())
def load(): ScriptTracker.install( EventManager.get(), CommandManager.get() )
def load(): sys.path.append(EnsoApi().get_enso_commands_folder()) ScriptTracker.install( EventManager.get(), CommandManager.get() )