Utility classes and functions¶
- mtrchk.org.momotor.render.diff.mixin.diff_files(left, right, *, left_header='Left', right_header='Right', tabsize=4, wrapcolumn=60, context_lines=4, encoding=None, ignore_final_newline=False, font='Consolas,"Courier New",monospace')¶
Compare two files and return an HTML diff.
- Parameters:
left (
File) – Left-side fileright (
File) – Right-side fileleft_header (
str) – Left-side headerright_header (
str) – Right-side headertabsize (
int) – Tab sizewrapcolumn (
int) – Column widthcontext_lines (
int) – Amount of context to show on the diff.-1for full diffencoding (
str) – Encoding to use when reading the filesignore_final_newline (
bool) – Ignore difference in final newlinefont (
str) – Font name(s) to use for the diff output. Multiple fonts can be specified, separated by commas
- Return type:
- Returns:
The HTML diff and CSS