def export_access(argv=None):
    if argv is None:
        argv = sys.argv[1:]
    parser = argparse.ArgumentParser(description=export_access.__doc__)
    parser.add_argument('config', help="Name of config file")
    parser.add_argument('-o', help="Name of output file")

    args = parser.parse_args(argv)
    logging.basicConfig()

    env = bootstrap(args.config)
    access = env['request'].access
    data = access.dump()
    if args.o:
        with gzip.open(args.o, 'w') as ofile:
            json.dump(data, ofile)
    else:
        print json.dumps(data, indent=2)
Dump the access control data to a universal format
dataset/ETHPy150Open mathcamp/pypicloud/pypicloud/scripts.py/export_access