code: def ReadDictionary(self, file):
          
  
          fil = dictfile.DictFile(file)
  
          state = {}
          state['vendor'] = ''
  
          self.defer_parse = []
          for line in fil:
              state['file'] = fil.File()
              state['line'] = fil.Line()
              line = line.split('#', 1)[0].strip()
  
              tokens = line.split()
              if not tokens:
                  continue
  
              key = tokens[0].upper()
              if key == 'ATTRIBUTE':
                  self.__ParseAttribute(state, tokens)
              elif key == 'VALUE':
                  self.__ParseValue(state, tokens, True)
              elif key == 'VENDOR':
                  self.__ParseVendor(state, tokens)
              elif key == 'BEGIN-VENDOR':
                  self.__ParseBeginVendor(state, tokens)
              elif key == 'END-VENDOR':
                  self.__ParseEndVendor(state, tokens)
  
          for state, tokens in self.defer_parse:
              key = tokens[0].upper()
              if key == 'VALUE':
                  self.__ParseValue(state, tokens, False)
          self.defer_parse = []
docs: Parse a dictionary file.
          Reads a RADIUS dictionary file and merges its contents into the
          class instance.
  
          :param file: Name of dictionary file to parse or a file-like object
          :type file:  string or file-like object