(args=None)
| 1908 | |
| 1909 | |
| 1910 | def _main(args=None): |
| 1911 | import argparse |
| 1912 | import pprint |
| 1913 | parser = argparse.ArgumentParser( |
| 1914 | description='display contents of the pickle files', |
| 1915 | color=True, |
| 1916 | ) |
| 1917 | parser.add_argument( |
| 1918 | 'pickle_file', |
| 1919 | nargs='+', help='the pickle file') |
| 1920 | args = parser.parse_args(args) |
| 1921 | for fn in args.pickle_file: |
| 1922 | if fn == '-': |
| 1923 | obj = load(sys.stdin.buffer) |
| 1924 | else: |
| 1925 | with open(fn, 'rb') as f: |
| 1926 | obj = load(f) |
| 1927 | pprint.pprint(obj) |
| 1928 | |
| 1929 | |
| 1930 | if __name__ == "__main__": |
no test coverage detected