bag.subcommand module

Decorator that makes it easy to use argh to create subcommands.

Usage:

from bag.subcommand import subcommand, main

@subcommand
def my_subcommand(foo:'Help for foo'='default value'):
    pass

if __name__ == '__main__':
    main()
bag.subcommand.main()[source]

Use argh to dispatch to your subcommands.

bag.subcommand.subcommand(fn)[source]

Decorate fn adding it to a list.