# Copyright 2011 by Bryan Catanzaro, bcatanzaro@acm.org # Licensed under the Creative Commons 3.0 Unported License # http://creativecommons.org/licenses/by/3.0/ # modified 2011 by Sara McMains # call it on a single file: # > python thatwhich.py foo.tex # or call it on all the tex files in a directory: # > find . -name '*.tex' -print -exec python thatwhich {} \; > thatwhicherrors.txt import re import sys that = ('that', re.compile(r'.{0,35}(?<=,\s)that.{0,35}')) which = ('which', re.compile(r'.{0,35}(?