Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
"""
Pretty print contents of pickle file
"""
__version__ = "1.0"
__date__ = "20190730"
__author__ = "kthoden@mpiwg-berlin.mpg.de"
import argparse
import logging
import pickle5 as pickle
import pprint
logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s')
def main():
"""The main bit"""
parser = argparse.ArgumentParser()
parser.add_argument("picklefile", help="The pickle file to be inspected")
args = parser.parse_args()
with open(args.picklefile, "rb") as piii:
data = pickle.load(piii)
pp = pprint.PrettyPrinter(width=80, compact=True)
pp.pprint(data)
# def main ends here
if __name__ == '__main__':
main()
# finis