Arbitrary command line arguments in python

前端 未结 3 1665
离开以前
离开以前 2021-01-06 11:55

I want to allow arbitrary command line arguments. If the user provides me with a command line that looks like this

myscript.py --a valueofa --b valueofb posar

3条回答
  •  春和景丽
    2021-01-06 12:31

    Sadly, you can't. If you have to support this, you'll need to write your own option parser =(.

提交回复
热议问题