def create_shell(shell=None, **kwargs): """Returns a Shell of the given type, or the current shell type if shell is None.""" if not shell: shell = config.default_shell if not shell: from rez.system import system shell = system.shell from rez.plugin_managers import plugin_manager return plugin_manager.create_instance('shell', shell, **kwargs)
def create_shell(shell=None, **kwargs): """Returns a Shell of the given or current type. Returns: `Shell`: Instance of given shell. """ if not shell: shell = config.default_shell if not shell: from rez.system import system shell = system.shell from rez.plugin_managers import plugin_manager return plugin_manager.create_instance('shell', shell, **kwargs)
def create_release_hook(name, source_path): """Return a new release hook of the given type.""" from rez.plugin_managers import plugin_manager return plugin_manager.create_instance('release_hook', name, source_path=source_path)