def get_pkg_data_fileobjs(datadir, package=None, pattern=u'*', encoding=None):
 for fn in get_pkg_data_filenames(datadir, package=package, pattern=pattern):
  with get_readable_fileobj(fn, encoding=encoding) as fd:
   (yield fd)

def get_pkg_data_fileobjs ( datadir , package = None , pattern = u'*' , encoding = None ) : for fn in get_pkg_data_filenames ( datadir , package = package , pattern = pattern ) : with get_readable_fileobj ( fn , encoding = encoding ) as fd : ( yield fd )
returns readable file objects for all of the data files in a given directory that match a given glob pattern .