All formats

CHM libraries for Python

Without native dependencies, you can also extract a CHM with the 7z command (subprocess.run(["7z", "x", "help.chm", "-oout"])) and parse the extracted .hhc table of contents with an HTML parser. The archmage tool, built on pychm, converts CHM to HTML or PDF.