def singleton(cls, *args, **kw):
    instance = {}
    def _singleton():
        if cls not in instance:
            instance[cls] = cls(*args, **kw)
        return instance[cls]
    return _singleton
Create and add buttons from a list of strings
dataset/ETHPy150Open bufferx/twork/twork/utils/common.py/singleton--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/contrib/cdat/graphics_method_controller.py/QRadioButtonFrame.addButtonList