Dear GDB, I'm attaching a patch that implements two classes, GdbOptionParser and GdbArgumentParser, which are built around python's standard optparse and argparse but play well with gdb (e.g. don't call exit if you make a typo or ask for help!). The code imports with python >= 2.3, but only provides the argparse-based parser if you actually have argparse in your path (python == 2.7?). The patch: Implements the classes Adds docs Adds test cases What else do you need to get this into the source tree? I'm not sure how to deal with copyright assignment. The patch comes from cvs, so I could just check it in, given the magic handshake, but I suspect that that's not the way you do things. In git/hg I could issue a pull request... R P.S. Tom: this supersedes the patch I sent you a yesterday ago, and handles --help better