def _fill_colors(self, colors, pathname=u'', song=None): if getattr(colors, u'__bases__', None): for base in colors.__bases__: self._fill_colors(base, song=song, pathname=pathname) for k, v in iteritems(colors.__dict__): if k[:1] != u'_': if callable(v): self._fill_colors(v, pathname + k + u'.', song=song) else: if is_dynamic_color_factory(v): v = self._get_dynamic_color(v, song) self._colors[pathname + k] = v
def _fill_colors(self, colors, pathname='', song=None): try: self._fill_colors(super(colors), song=song, pathname=pathname) except TypeError: for base in colors.__bases__: self._fill_colors(base, song=song, pathname=pathname) for k, v in colors.__dict__.iteritems(): if k[:1] != '_': if callable(v): self._fill_colors(v, pathname + k + '.', song=song) else: if is_dynamic_color_factory(v): v = self._get_dynamic_color(v, song) self._colors[pathname + k] = v
def _fill_colors(self, colors, pathname = '', song = None): try: self._fill_colors(super(colors), song=song, pathname=pathname) except TypeError: for base in colors.__bases__: self._fill_colors(base, song=song, pathname=pathname) for k, v in colors.__dict__.iteritems(): if k[:1] != '_': if callable(v): self._fill_colors(v, pathname + k + '.', song=song) else: if is_dynamic_color_factory(v): v = self._get_dynamic_color(v, song) self._colors[pathname + k] = v