has_extension

glue.core.data_factories.has_extension(exts)

A simple default filetype identifier function

It returns a function that tests whether its input filename contains a particular extension

Parameters:

exts : str

A space-delimited string listing the extensions (e.g., ‘txt’, or ‘txt csv fits’)

Returns:

A function suitable as a factory identifier function