Mercurial > dottes
comparison abcfield.py @ 734:e896cf93fe98
Remove vestiges of support for stdin input to abcfield.py.
I'm not using it, and it complicates things a bit.
| author | Jim Hague <jim.hague@acm.org> |
|---|---|
| date | Thu, 12 Oct 2017 13:29:50 +0100 |
| parents | 841f7c19cb55 |
| children | 68f926e61d16 |
comparison
equal
deleted
inserted
replaced
| 733:841f7c19cb55 | 734:e896cf93fe98 |
|---|---|
| 283 metavar="CONTENT") | 283 metavar="CONTENT") |
| 284 parser.add_argument('input', type=argparse.FileType('r'), | 284 parser.add_argument('input', type=argparse.FileType('r'), |
| 285 help='input ABC file') | 285 help='input ABC file') |
| 286 args = parser.parse_args() | 286 args = parser.parse_args() |
| 287 | 287 |
| 288 res = False | 288 path = pathlib.Path(args.input.name) |
| 289 if args.input: | 289 with path.open() as f: |
| 290 path = pathlib.Path(args.input.name) | 290 res = process(f, path.parent, args) |
| 291 with path.open() as f: | |
| 292 res = process(f, path.parent, args) | |
| 293 else: | |
| 294 res = process(sys.stdin, ".", args) | |
| 295 sys.exit(int(not res)) | 291 sys.exit(int(not res)) |
