Lines Matching refs:tofile
139 .. function:: context_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm…
159 *tofile*, *fromfiledate*, and *tofiledate*. The modification times are normally
165 >>> for line in context_diff(s1, s2, fromfile='before.py', tofile='after.py'):
273 .. function:: unified_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm…
294 *tofile*, *fromfiledate*, and *tofiledate*. The modification times are normally
300 >>> for line in unified_diff(s1, s2, fromfile='before.py', tofile='after.py'):
734 usage = "usage: %prog [options] fromfile tofile"
752 parser.error("need to specify both a fromfile and tofile")
755 fromfile, tofile = args # as specified in the usage string
759 todate = time.ctime(os.stat(tofile).st_mtime)
762 with open(tofile, 'U') as f:
766 diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile,
772 tofile, context=options.c,
775 diff = difflib.context_diff(fromlines, tolines, fromfile, tofile,