mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 17:16:07 +01:00
Optparse doesn't support argparse nargs='+' style arguments. This patch adds a callback utility function that allows that idiom. The function is taken from the page at http://docs.python.org/2/library/optparse.html#callback-example-6-variable-arguments. Here's an example of how to use it: from beets.ui import vararg_callback parser.add_option("-c", "--callback", dest="vararg_attr", action="callback", callback=vararg_callback) |
||
|---|---|---|
| .. | ||
| dev | ||
| guides | ||
| plugins | ||
| reference | ||
| changelog.rst | ||
| conf.py | ||
| faq.rst | ||
| index.rst | ||
| Makefile | ||