def runlines(lines, print=print, **substitutions): for line in String.splitlines(lines.format(**substitutions)): run(line.split(), print=print)