omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    docopt as alternative to argparse

    Pythonista
    1
    1
    1023
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JonB
      JonB last edited by

      just stumbled across this while working on a github stash command (fork, create, pull-request). somewhat specific to commandline tools, but I love this idea.... you write the help, and docopt parses the docstring and gives you an argument dict. So much cleaner than 20 lines of argparse gibberish that i forget everytime i have to use it.

      anyway... thought i'd share, others may find it useful
      github.com/docopt

      1 Reply Last reply Reply Quote 1
      • First post
        Last post
      Powered by NodeBB Forums | Contributors