Stop argparse from globbing filepath

前端 未结 3 1991
北恋
北恋 2021-01-12 23:08

I am using python argparse with the following argument definition:

parser.add_argument(\'path\', nargs=1, help=\'File path to process\')

Bu

3条回答
  •  青春惊慌失措
    2021-01-12 23:41

    The globbing is done by your shell, not by the argparse module. print sys.argv at the beginning and you will see what argparse gets as input.

提交回复
热议问题