mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 09:04:33 +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) |
||
|---|---|---|
| .. | ||
| api.rst | ||
| index.rst | ||
| plugins.rst | ||