1
2つのファイルを比較するpythonの方法を探しています。file1とfile2は、パッチファイルの形式の違いを取得し、その違いをfile2にマージします。私は違いを見つけるためにGoogleのPythonのAPIのdif_match_patchで次のポストImplementing Google's DiffMatchPatch API for Python 2/3を見てきましたが、私は作成して、パッチを適用するソリューションを探していますpython diff_match_patchを使ってパッチを作成して適用する方法
diff file1 file2 > diff.patch
apply the patch diff.patch to file2 // this must be doing something like git apply.
:コードは、このような何かを行う必要があります。