@main.command()<EOL>@click.pass_context<EOL>@onlineChain<EOL>@click.argument("<STR_LIT>", type=str, nargs=-<NUM_LIT:1>)<EOL>def info(ctx, objects):
if not objects:<EOL><INDENT>t = PrettyTable(["<STR_LIT>", "<STR_LIT>"])<EOL>t.align = "<STR_LIT:l>"<EOL>info = ctx.peerplays.rpc.get_dynamic_global_properties()<EOL>for key in info:<EOL><INDENT>t.add_row([key, info[key]])<EOL><DEDENT>click.echo(t.get_string(sortby="<STR_LIT>"))<EOL><DEDENT>for obj in objects:<EOL><INDENT>if re.match("<STR_LIT>", obj):<EOL><INDENT>block = Block(obj, peerplays_instance=ctx.peerplays)<EOL>if block:<EOL><INDENT>t = PrettyTable(["<STR_LIT>", "<STR_LIT>"])<EOL>t.align = "<STR_LIT:l>"<EOL>for key in sorted(block):<EOL><INDENT>value = block[key]<EOL>if key == "<STR_LIT>":<EOL><INDENT>value = json.dumps(value, indent=<NUM_LIT:4>)<EOL><DEDENT>t.add_row([key, value])<EOL><DEDENT>click.echo(t)<EOL><DEDENT>else:<EOL><INDENT>click.echo("<STR_LIT>" % obj)<EOL><DEDENT><DEDENT>elif len(obj.split("<STR_LIT:.>")) == <NUM_LIT:3>:<EOL><INDENT>data = ctx.peerplays.rpc.get_object(obj)<EOL>if data:<EOL><INDENT>t = PrettyTable(["<STR_LIT>", "<STR_LIT>"])<EOL>t.align = "<STR_LIT:l>"<EOL>for key in sorted(data):<EOL><INDENT>value = data[key]<EOL>if isinstance(value, dict) or isinstance(value, list):<EOL><INDENT>value = json.dumps(value, indent=<NUM_LIT:4>)<EOL><DEDENT>t.add_row([key, value])<EOL><DEDENT>click.echo(t)<EOL><DEDENT>else:<EOL><INDENT>click.echo("<STR_LIT>" % obj)<EOL><DEDENT><DEDENT>elif obj.upper() == obj:<EOL><INDENT>data = Asset(obj)<EOL>t = PrettyTable(["<STR_LIT>", "<STR_LIT>"])<EOL>t.align = "<STR_LIT:l>"<EOL>for key in sorted(data):<EOL><INDENT>value = data[key]<EOL>if isinstance(value, dict):<EOL><INDENT>value = json.dumps(value, indent=<NUM_LIT:4>)<EOL><DEDENT>t.add_row([key, value])<EOL><DEDENT>click.echo(t)<EOL><DEDENT>elif re.match("<STR_LIT>", obj):<EOL><INDENT>account = ctx.peerplays.wallet.getAccountFromPublicKey(obj)<EOL>if account:<EOL><INDENT>t = PrettyTable(["<STR_LIT>"])<EOL>t.align = "<STR_LIT:l>"<EOL>t.add_row([account])<EOL>click.echo(t)<EOL><DEDENT>else:<EOL><INDENT>click.echo("<STR_LIT>" % obj)<EOL><DEDENT><DEDENT>elif re.match("<STR_LIT>", obj):<EOL><INDENT>account = Account(obj, full=True)<EOL>if account:<EOL><INDENT>t = PrettyTable(["<STR_LIT>", "<STR_LIT>"])<EOL>t.align = "<STR_LIT:l>"<EOL>for key in sorted(account):<EOL><INDENT>value = account[key]<EOL>if isinstance(value, dict) or isinstance(value, list):<EOL><INDENT>value = json.dumps(value, indent=<NUM_LIT:4>)<EOL><DEDENT>t.add_row([key, value])<EOL><DEDENT>click.echo(t)<EOL><DEDENT>else:<EOL><INDENT>click.echo("<STR_LIT>" % obj)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>click.echo("<STR_LIT>")<EOL><DEDENT><DEDENT>
Obtain all kinds of information