text: def singleton(cls, *args, **kw):
      instances = {}
  
      def _singleton():
          if cls not in instances:
              instances[cls] = cls(*args, **kw)
          return instances[cls]
  
      return _singleton
  
  
  @singleton
  class Config(object):
      selectedDevice = ""
      devices = []
      rules = []
  