Get Supported File Formats Programmatically

If you need the full list of formats at runtime — for example, to validate user input — use the static FileType.get_supported_file_types() method.

Example: List all supported file formats

from groupdocs.comparison.result import FileType

def get_supported_file_formats():
    supported_file_types = FileType.get_supported_file_types()
    for file_type in sorted(supported_file_types, key=lambda x: x.extension):
        print(file_type)
    print("\nSupported file types retrieved successfully.")

if __name__ == "__main__":
    get_supported_file_formats()
ActionScript Programming Language format (.as)
ActionScript Programming Language format (.as3)
Assembler Programming Language format (.asm)
Type of interpreter that processes shell commands (.bash)
File determines the behavior of interactive shells (.bashrc)
Script file in DOS, OS/2 and Microsoft Windows (.bat)
Configuration file for package control on the server-side (.bowerrc)
C-Based Programming Language format (.c)
CAD file format (.cad)
CSharp cross-platform build automation system format (
[TRUNCATED]

Download full output

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.