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 July 11, 2024 11:13
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