def register_palette(self, palette):

        for item in palette:
            if len(item) in (3,4,6):
                self.register_palette_entry(*item)
                continue
            if len(item) != 2:
                raise ScreenError("Invalid register_palette entry: %s" %
                    repr(item))
            name, like_name = item
            if not self._palette.has_key(like_name):
                raise ScreenError("palette entry '%s' doesn't exist"%like_name)
            self._palette[name] = self._palette[like_name]
@Application.option decorator should register a command with a specific option
dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/display_common.py/BaseScreen.register_palette--crossover with--dataset/ETHPy150Open sdispater/cleo/tests/test_application.py/ApplicationTest.test_option_decorator