diff -r 13254db884e9 Lib/pickle.py --- a/Lib/pickle.py Sun Jun 01 12:36:39 2014 +0300 +++ b/Lib/pickle.py Sun Jun 01 15:34:07 2014 +0200 @@ -1581,6 +1581,12 @@ 'pickle_file', type=argparse.FileType('br'), nargs='*', help='the pickle file') parser.add_argument( + '-w', '--width', type=int, + help='maximum number of characters per line') + parser.add_argument( + '-c', '--compact', action='store_true', + help='display as many items as will fit on each output line') + parser.add_argument( '-t', '--test', action='store_true', help='run self-test suite') parser.add_argument( @@ -1594,6 +1600,9 @@ parser.print_help() else: import pprint + kwargs = {'compact': args.compact} + if args.width is not None: + kwargs['width'] = args.width for f in args.pickle_file: obj = load(f) - pprint.pprint(obj) + pprint.pprint(obj, **kwargs)