def _FindPythonFiles(filenames, recursive, exclude):
  python_files = []
  for filename in filenames:
    if os.path.isdir(filename):
      if recursive:
        # TODO(morbo): Look into a version of os.walk that can handle recursion.
        python_files.extend(
            os.path.join(dirpath, f)
            for dirpath, _, filelist in os.walk(filename) for f in filelist
            if IsPythonFile(os.path.join(dirpath, f)))
      else:
        raise errors.YapfError(
            "directory specified without '--recursive' flag: %s" % filename)
    elif os.path.isfile(filename):
      python_files.append(filename)

  if exclude:
    return [f
            for f in python_files
            if not any(fnmatch.fnmatch(f, p) for p in exclude)]

  return python_files
Get the active log format for the SMTP virtual server.
dataset/ETHPy150Open google/yapf/yapf/yapflib/file_resources.py/_FindPythonFiles--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/win_smtp_server.py/get_log_format