# HG changeset patch # User Jeff Hammel # Date 1379690621 25200 # Node ID 8b990efa4648493106667018debeda4ec38e0e75 # Parent 4e2d8a7eb1887108e6a6f3b3a6f0b810442e93e1 python/applyrealhard.py diff -r 4e2d8a7eb188 -r 8b990efa4648 python/applyrealhard.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/applyrealhard.py Fri Sep 20 08:23:41 2013 -0700 @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# XXX STUB + +""" +http://code.google.com/p/python-patch/ +""" + +import difflib +import optparse +import os +import subprocess +import sys +from which import which + +here = os.path.dirname(os.path.realpath(__file__)) + +wiggle = which('wiggle') + +def find(directory, pattern): + # TODO: -> python + return [i for i in subprocess.check_output(['find', directory, '-iname', patten]).splitlines() if i.strip()] + +def rejects(directory): + """all rejects in directory""" + # TODO: not call out to find + + +def main(args=sys.argv[1:]): + + usage = '%prog [options]' + parser = optparse.OptionParser(usage=usage, description=__doc__) + parser.add_option('-d', '--directory', default=os.getcwd()) + options, args = parser.parse_args(args) + + + +if __name__ == '__main__': + main()