[ python-Bugs-873150 ] pickletools support for multiple pickles in a string

SourceForge.net noreply at sourceforge.net
Thu Jan 8 12:18:56 EST 2004


Bugs item #873150, was opened at 2004-01-08 10:53
Message generated for change (Comment added) made by fdrake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=873150&group_id=5470

Category: Python Library
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Fred L. Drake, Jr. (fdrake)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: pickletools support for multiple pickles in a string

Initial Comment:
It would be nice if it were easier to "look at"
multiple pickles in a string using pickletools.  The
issue is that multiple pickles created using a single
pickler share a memo.  Some unpickler-like object would
be conventient to work with for this case.

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-01-08 12:18

Message:
Logged In: YES 
user_id=3066

There's a reason I assigned it to myself.  ;-)

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2004-01-08 12:14

Message:
Logged In: YES 
user_id=31435

Well, the module is called pickletools, not 
pickleeverydamnfoolfunctionicanthinkof <wink>.  Convenience 
is for wusses, but you have my blessing if somone wants to 
bother.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2004-01-08 12:10

Message:
Logged In: YES 
user_id=3066

Yes, we found that, but it would be nice to have a more
convenient interface for it.  Note that you're example will
still just disassemble the first object 3 times it "pickle"
is a string; a fairly trivial convenience object can wrap
that with a StringIO so you actually handle subsequent
pickles when calling for a disassembly.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2004-01-08 11:15

Message:
Logged In: YES 
user_id=31435

pickletools.dis() already has an optional memo argument.  Do

mymemo = {}
dis(pickle, memo=mymemo)
dis(pickle, memo=mymemo)
dis(pickle, memo=mymemo)

(for example) to disassemble the first 3 objects in a pickle.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=873150&group_id=5470



More information about the Python-bugs-list mailing list