Exemplo n.º 1
0
def registry():
    global _REGISTRY
    if not _REGISTRY:
        _REGISTRY = register(
          __name__,
          'Alias',
          'Broadcast',
          'Transfer',
          'Save',
          'Window',
        )
    return _REGISTRY
Exemplo n.º 2
0
def registry():
    global _REGISTRY
    if not _REGISTRY:
        _REGISTRY = register(
            __name__,
            'Alias',
            'Broadcast',
            'Transfer',
            'Save',
            'Window',
        )
    return _REGISTRY
Exemplo n.º 3
0
from __future__ import absolute_import, division, print_function, unicode_literals

from echomesh.util.registry.Module import register
from echomesh.output.OutputCache import OutputCache

REGISTRY = register(
  __name__,
  'Bidirectional',
  'Offset',
  'Output',
  'Map',
  'Spi',
  'Test',
  'Visualizer',
)

OUTPUT_CACHE = OutputCache()

def make_output(data):
    if isinstance(data, dict):
        return REGISTRY.make_from_description(data, default_type='output')
    else:
        return OUTPUT_CACHE.get_output(data)

def pause_outputs():
    from echomesh.output.Output import pause_outputs
    pause_outputs()
Exemplo n.º 4
0
from echomesh.util.registry.Module import register
from echomesh.base import DataFile

REGISTRY = register(
  __name__,
  'Animation',
  'Choose',
  'Columns',
  'Concatenate',
  'Expand',
  'Fade',
  'Image',
  'Inject',
  'Insert',
  'List',
  'Mirror',
  'Scroll',
  'Spread',
  'Text',
  'Tile',
  'Reverse',
)

def make_pattern(element, description, name=None, patterns=None):
    if not isinstance(description, dict):
        name = description
        pattern = (patterns or {}).get(name)
        if pattern:
            return pattern
        description = DataFile.load('pattern', name)[0]