from cmd2 import Cmd, make_option, options
import sys, optparse
class CmdLineApp(Cmd):
@options([make_option('-a', '--append', action="store_true", help="Help for append"),
make_option('-b', '--prepend', action="store_true", help="Help for prepend")
])
def do_test(self, arg, opts=None):
pass
app = CmdLineApp()
func = getattr(app, 'do_test')
print func
#как получить список опций?