Skip to content

Instantly share code, notes, and snippets.

View noporpoise's full-sized avatar

Isaac Turner noporpoise

View GitHub Profile
@noporpoise
noporpoise / unifieddiff.py
Last active November 14, 2023 18:59
Apply unified diff patches in pure python2/3
#!/usr/bin/env python
# coding=utf-8
# License: Public domain (CC0)
# Isaac Turner 2016/12/05
from __future__ import print_function
import difflib
import re