This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argpase | |
import fileinput | |
if __name__ == '__main__': | |
parser = ArgumentParser() | |
parser.add_argument('--dummy', help='dummy argument') | |
parser.add_argument('files', metavar='FILE', nargs='*', help='files to read, if empty, stdin is used') | |
args = parser.parse_args() | |
# If you would call fileinput.input() without files it would try to process all arguments. |