def reload_scripts(): remove_all_scripts() if "CLTools" == identifiers.name: # this is the original package location = os.path.join(vistrails.core.system.current_dot_vistrails(), "CLTools") # make sure dir exist if not os.path.isdir(location): try: debug.log("Creating CLTools directory...") os.mkdir(location) except: debug.critical("""Could not create CLTools directory. Make sure '%s' does not exist and parent directory is writable""" % location) sys.exit(1) else: # this is a standalone package so modules are placed in this directory location = os.path.dirname(__file__) for path in os.listdir(location): if path.endswith(SUFFIX): try: add_tool(os.path.join(location, path)) except Exception as exc: import traceback debug.critical("Package CLTools failed to create module " "from '%s': %s" % (os.path.join(location, path), exc), traceback.format_exc()) from vistrails.core.interpreter.cached import CachedInterpreter CachedInterpreter.clear_package(identifiers.identifier) from vistrails.gui.vistrails_window import _app _app.invalidate_pipelines()
def invalidate_current_pipeline(self): from vistrails.gui.vistrails_window import _app _app.invalidate_pipelines()
location = os.path.dirname(__file__) if initial: reg.add_module(CLTools, abstract=True) if name is None: for path in os.listdir(location): if path.endswith(SUFFIX): # pragma: no branch add_tool(os.path.join(location, path)) else: path = os.path.join(location, name + SUFFIX) if os.path.exists(path): add_tool(path) if not initial: from vistrails.gui.vistrails_window import _app _app.invalidate_pipelines() wizards_list = [] def menu_items(): """menu_items() -> tuple of (str,function) It returns a list of pairs containing text for the menu and a callback function that will be executed when that menu item is selected. """ try: from wizard import QCLToolsWizardWindow except Exception, e: # pragma: no cover if "CLTools" == identifiers.name: debug.unexpected_exception(e)
reg.add_module(CLTools, abstract=True) if name is None: for path in os.listdir(location): if path.endswith(SUFFIX): # pragma: no branch add_tool(os.path.join(location, path)) else: path = os.path.join(location, name + SUFFIX) if os.path.exists(path): add_tool(path) if not initial: from vistrails.core.interpreter.cached import CachedInterpreter CachedInterpreter.clear_package(identifiers.identifier) from vistrails.gui.vistrails_window import _app _app.invalidate_pipelines() wizards_list = [] def menu_items(): """menu_items() -> tuple of (str,function) It returns a list of pairs containing text for the menu and a callback function that will be executed when that menu item is selected. """ try: from wizard import QCLToolsWizardWindow except Exception, e: # pragma: no cover if "CLTools" == identifiers.name: