The returned list also contains the FileType.UNKNOWN value, which has an empty extension. An example of obtaining a list of supported file types is presented below. The example filters and sorts the list with a generator expression and the built-in sorted function.
fromgroupdocs.search.resultsimportFileTypesupported_file_types=sorted((ftforftinFileType.get_supported_file_types()ifft!=FileType.UNKNOWN),# Skipping the unknown file typekey=lambdaft:ft.extension)forfile_typeinsupported_file_types:print(file_type.extension.ljust(8)+" - "+file_type.description)
.asf - Advanced Systems Format File
.avi - Audio Video Interleave File
.bmp - Bitmap Picture
.chm - Microsoft Compiled HTML Help
.csv - Comma-Separated Values
.dc3 - Medicine Image File Format
.dcm - DICOM Image
.dic - DICOM Image
.dicom - DICOM Image
.djv - DjVu Image
[TRUNCATED]