def config(args):
    """execute subcommand config"""
    if args.default:
        from liesl.cli.lsl_api import init_lsl_api_cfg
        init_lsl_api_cfg(args.scope)
        return
    from liesl.cli.lsl_api import Ini
    ini = Ini(args.scope)
    ini.refresh()
    if args.sessionid:
        print(args.sessionid)
        try:
            ini.ini['lab']['SessionID'] = args.sessionid
        except KeyError:
            ini.ini['lab'] = {}
            ini.ini['lab']['SessionID'] = args.sessionid
        ini.write()
    if args.knownpeers:
        print(args.knownpeers)
        try:
            ini.ini['lab']['KnownPeers'] = '{' + args.knownpeers + '}'
        except KeyError:
            ini.ini['lab'] = {}
            ini.ini['lab']['KnownPeers'] = '{' + args.knownpeers + '}'
        ini.write()
    from liesl.cli.lsl_api import print_config
    print_config(args.scope)
