File: config_source

package info (click to toggle)
python-milc 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 788 kB
  • sloc: python: 1,868; sh: 55; makefile: 3
file content (16 lines) | stat: -rwxr-xr-x 367 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
"""Make sure we get the right config source.

PYTHON_ARGCOMPLETE_OK
"""
from milc import cli


@cli.argument('-n', '--name', help='Name to greet', default='World')
@cli.entrypoint('Greet a user.')
def main(cli):
    cli.echo('Hello, %s, from %s!', cli.config.general.name, cli.config_source.general.name)


if __name__ == '__main__':
    cli()