Exemplo n.º 1
0
 def init(self):
     self.opacity_dict = {}
     self._opacity_path = None
     self.log = Logger('OpacityCache')
     self._default_interpolation = 'linear'
     self._memory_mode = True
     self._radis = False
     self._radis_props = (600, 30000, 10000)
Exemplo n.º 2
0
from taurex.log import Logger
from .classfactory import ClassFactory
log = Logger('Factory')


def get_keywordarg_dict(klass, is_mixin=False):

    import inspect
    init_dicts = {}
    if not is_mixin:
        init_dicts = {}
        args, varargs, varkw, defaults = inspect.getargspec(klass.__init__)
        log.debug('Inpection {} {} {} {}'.format(args, varargs, varkw,
                                                 defaults))
        if defaults is None:
            return init_dicts

        keyword_args = args[-len(defaults):]

        for keyword, value in zip(keyword_args, defaults):
            init_dicts[keyword] = value
    else:
        from taurex.mixin.core import determine_mixin_args
        init_dicts = determine_mixin_args(klass.__bases__)

    return init_dicts


def create_klass(config, klass, is_mixin):
    kwargs = get_keywordarg_dict(klass, is_mixin)
Exemplo n.º 3
0
 def init(self):
     self.variable_dict = {}
     self.log = Logger('GlobalCache')
Exemplo n.º 4
0
 def init(self):
     self.cia_dict = {}
     self._cia_path = None
     self.log = Logger('CIACache')
Exemplo n.º 5
0
 def init(self):
     self.opacity_dict = {}
     self._opacity_path = None
     self.log = Logger('OpacityCache')
     self._force_active = []
Exemplo n.º 6
0
    def init(self):
        self.log = Logger('ClassFactory')

        self.extension_paths = []
        self.reload_plugins()