Load File from Local Disk
Leave feedback
On this page
When source and target files are on the local disk, pass their paths directly to Comparer and add(). Both absolute and relative paths work.
from groupdocs.comparison import Comparer
def load_file_from_local_disk():
with Comparer("./source.docx") as comparer:
comparer.add("./target.docx")
comparer.compare("./result.docx")
print("Documents compared successfully. Check output in result.docx.")
if __name__ == "__main__":
load_file_from_local_disk()
source.docx is the source file used in this example. Click here to download it.
target.docx is the target file used in this example. Click here to download it.
Binary file (DOCX, 25 KB)
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.