The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
467 B
22 lines
467 B
#!/usr/bin/env python3 |
|
|
|
import sys |
|
import argparse |
|
|
|
def main(): |
|
parser = argparse.ArgumentParser() |
|
parser.add_argument('file', nargs=1, type=str) |
|
parser.add_argument('text', nargs=1, type=str) |
|
args = parser.parse_args() |
|
|
|
text = args.text[0] |
|
|
|
with open(args.file[0], 'r', encoding='utf-8') as f: |
|
for line in f: |
|
if line.strip() == text: |
|
return 0 |
|
|
|
return 1 |
|
|
|
if __name__ == '__main__': |
|
sys.exit(main())
|
|
|