Example #1
0
File: shells.py Project: rvsiy/rez
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)
Example #2
0
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)
Example #3
0
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)
Example #4
0
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)
Example #5
0
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)