def __call__(self, cli, args): """Dump json representation.""" cmd = args.pop(0) if not cli.cur_list: print "No list to operate on." return if len(args) < 1: print repr(cli.cur_list) return try: num = int(args[0]) - 1 print pysonic.pretty(cli.cur_list[num]) except ValueError, ex: print "Wrong format"
def __repr__(self): return pretty(self.entries)