def cmd_lines(args): data = sys.stdin.buffer.read() document = BandwidthFile(data) allowed_errors = [] if args.forgive: for allowed_error in args.forgive.split(","): allowed_errors.append(DirectoryDocumentItemError(allowed_error)) for item in document.lines(allowed_errors=allowed_errors): print(item)
def test_example_sbws_104(): for line in BandwidthFile(example_sbws_104).lines(): pass
def test_example_version_100(): for line in BandwidthFile(example_version_100).lines(): pass
def test_example_not_enough_eligible(): for line in BandwidthFile(example_sbws_104).lines(): pass
def test_example_sbws_010(): for line in BandwidthFile(example_sbws_010).lines(): pass
def cmd_tokenize(args): data = sys.stdin.buffer.read() document = BandwidthFile(data) for token in document.tokenize(): print(token)