Let\'s say I have a script that does some work on a file. It takes this file\'s name on the command line, but if it\'s not provided, it defaults to a known filename (conte
conte
Use stdin as default:
parser.add_argument('file', default='-', nargs='?', type=argparse.FileType('r'))