utility to display the contents of a pickle (fwd) (fwd)

Tom nospam at nospam.com
Sat Oct 14 16:44:27 EDT 2000


I had in mind a utility that would display the contents of a pickle file w/o
unpickling.  Sort of like:

Instance (module a, class b)
    Integer: 125
    Tuple: [1,2,3]
    Instance (module a, class b)
        String: 'blah'
etc.

This would be for occasions when you can't unpickle.  This is happening to
me rather frequently, and the error messages I get from the unpickler are
very cryptic.

Tom.

"Lulu of the Lotus-Eaters" <mertz at gnosis.cx> wrote in message
news:mailman.971541335.6741.python-list at python.org...
> From: "Tom" <nospam at nospam.com>
> | I thought I saw a post a few months ago regarding a utility that would
> | display the contents of a pickle file.
> | (I realize that a text editor fits this description, but I'm hoping for
> | something a bit more structured.)
>
> My xml_objectify module (check the Vaults) contains a utility function
> called pyobj_printer that makes a pretty representation of any Python
> object.  There is nothing terribly special about this 20 line function,
> but I assume this is basically what you want to do in representing a
> pickle file.  You'll need to unpickle before you pass to this function,
> of course.
>
>





More information about the Python-list mailing list