Exemplo n.º 1
0
Arquivo: shells.py Projeto: 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)