(args=None)
| 1939 | |
| 1940 | |
| 1941 | def _main(args=None): |
| 1942 | import argparse |
| 1943 | import pprint |
| 1944 | parser = argparse.ArgumentParser( |
| 1945 | description='display contents of the pickle files', |
| 1946 | color=True, |
| 1947 | ) |
| 1948 | parser.add_argument( |
| 1949 | 'pickle_file', |
| 1950 | nargs='+', help='the pickle file') |
| 1951 | args = parser.parse_args(args) |
| 1952 | for fn in args.pickle_file: |
| 1953 | if fn == '-': |
| 1954 | obj = load(sys.stdin.buffer) |
| 1955 | else: |
| 1956 | with open(fn, 'rb') as f: |
| 1957 | obj = load(f) |
| 1958 | pprint.pprint(obj) |
| 1959 | |
| 1960 | |
| 1961 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…