This commit is contained in:
Behdad Esfahbod 2012-01-21 19:55:16 -05:00
parent ab94a9c542
commit c78c6e9844
2 changed files with 9 additions and 6 deletions

View File

@ -2,4 +2,4 @@
from hb_test_tools import * from hb_test_tools import *
UtilMains.process_multiple_args (Manifest.print_to_stdout, mnemonic="DIR") UtilMains.process_multiple_args (UtilMains.filter_printer_function (Manifest.read), mnemonic="DIR")

View File

@ -116,6 +116,14 @@ class ShapeFilters:
class UtilMains: class UtilMains:
@staticmethod
def filter_printer_function (callback):
def printer (f):
for line in callback (f):
print line
return printer
@staticmethod @staticmethod
def process_multiple_files (callback, mnemonic = "FILE"): def process_multiple_files (callback, mnemonic = "FILE"):
@ -263,11 +271,6 @@ class Manifest:
else: else:
yield s yield s
@staticmethod
def print_to_stdout (s, strict = True):
for f in Manifest.read (s, strict=strict):
print f
@staticmethod @staticmethod
def update_recursive (s): def update_recursive (s):