How to read/process command line arguments?

后端 未结 17 2080
离开以前
离开以前 2020-11-21 05:14

I am originally a C programmer. I have seen numerous tricks and \"hacks\" to read many different arguments.

What are some of the ways Python programmers can do this

17条回答
  •  青春惊慌失措
    2020-11-21 05:43

    Pocoo's click is more intuitive, requires less boilerplate, and is at least as powerful as argparse.

    The only weakness I've encountered so far is that you can't do much customization to help pages, but that usually isn't a requirement and docopt seems like the clear choice when it is.

提交回复
热议问题