title: gem/git-style command line arguments in Python
body: <p>Is there a Python module for <strong>doing</strong> gem/git-style command line arguments? What I mean by gem/git style is:</p>
  
  <pre><code>$ ./MyApp.py
  The most commonly used MyApp commands are:
    add        Add file contents to the index
    bisect     Find by binary search the change that introduced a bug
    branch     List, create, or delete branches
    checkout   Checkout a branch or paths to the working tree
    ...
  
  $ ./MyApp.py branch
    * current-branch
      master
  </code></pre>
  
  <p>With no arguments, the output tells you how you can proceed. And there is a special "help" command:</p>
  
  <pre><code>$ ./MyApp.py help branch
  </code></pre>
  
  <p>Which gets you deeper tips about the "branch" command.</p>
  
  <p><strong>Edit:</strong>
  And by <strong>doing</strong> I mean it does the usage printing for you, exits with invalid input, runs your functions according to your CLI specification. Sort of a "URL mapper" for the command line.</p>