code: def load_package(package_dir, package=None, exclude=None, default_section=_DEFAULT_SECTION):
      
      init_py = '__init__.py'
      py_ext = '.py'
      files = os.listdir(package_dir)
      if init_py in files:
          files = [f for f in files if f != init_py]
          if package:
              files.insert(0, package)
  
      def init_package(item):
          if str(item).endswith(py_ext):
              item = item[:-3]
              if package:
                  item = '{package}.{item}'.format(package=package, item=item)
          elif _is_conf(item):
              item = '{package_dir}/{item}'.format(package_dir=package_dir, item=item)
          else:
              item = package
          return str(item)
  
      logger.debug(files)
      files = [init_package(f) for f in files]
      if exclude:
          files = [f for f in files if f not in exclude]
  
      settings = load(files, default_section)
      return merge(settings)
docs: 从目录中载入配置文件
      :param package_dir:
      :param package:
      :param exclude:
      :param default_section:
      :return: