Compare/Check if Two Text Files Have the Same Contents - Python for Integrated Circuits - - An Online Book - |
||||||||
Python for Integrated Circuits http://www.globalsino.com/ICs/ | ||||||||
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix | ||||||||
================================================================================= Compare/check if two text files have the same contents. Shallow mode: where only metadata of the files are compared like the size, date modified, etc. Deep mode: where the content of the files are compared. Code: ============================================ Compare two text files line-by-line. Code: ============================================ Comparing complete directory: returns three list containing matched files, including file contents and names. Code: ============================================ Comparing two text files: use HtmlDiff to generate an HTML table which
shows a side by side, line by line comparison of the text with inter-line and intra-line change highlights. Code:
|
||||||||
================================================================================= | ||||||||
|
||||||||