import argparse
if __name__=='__main__':
parser= argparse.ArgumentParser()
parser.add_argument('--template')
args= parser.parse_args()
print(args.template)
above_file.py --template sub-*/my/file.txt
reads all files described by the pattern, not the string sub-*/my/file.txt
. I would like to read the string only. I found a way around by enclosing the value within " "
. But I am wondering if something could be done inside add_argument
to prevent that from happening.