Title: Make python -m pickle do something useful
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.2
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: alexandre.vassalotti, belopolsky, mark.dickinson, pitrou
Priority: normal Keywords: easy, patch

Created on 2010-07-25 19:12 by belopolsky, last changed 2010-07-27 23:03 by belopolsky. This issue is now closed.

File name Uploaded Description Edit
pickle-m.diff belopolsky, 2010-07-25 19:12
Messages (3)
msg111553 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-25 19:12
Attached patch makes python -m pickle <pickle file> unpickle the first object from the pickle file and display it using pprint.  Future enhancements may include printing the summary (object number, object type) of the multiobject pickles, option to control display: pprint/repr or type only, lines/columns limits, and selective display from multi-object pickles.

I considered adding this functionality to pickletools (see issue 9094), but rejected because pickletools is more oriented towards pickle protocol developers and this functionality may be useful for casual pickle users.
msg111735 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-07-27 22:12
I haven't tested, but it looks good to me.
msg111747 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-27 23:03
Committed in r83188.
Date User Action Args
2010-07-27 23:03:18belopolskysetstatus: open -> closed

messages: + msg111747
stage: commit review -> resolved
2010-07-27 22:57:31belopolskysetresolution: accepted
stage: patch review -> commit review
2010-07-27 22:12:30pitrousetmessages: + msg111735
2010-07-25 19:12:56belopolskysetnosy: + mark.dickinson, pitrou, alexandre.vassalotti
2010-07-25 19:12:33belopolskycreate