Reading/writing binary data.

Dave Kuhlman dkuhlman at rexx.com
Sun Apr 14 13:54:53 EDT 2002


Ben Logan <ben at wblogan.net> wrote:
> 
> Thanks, Grant and Jeff, for your help.  Both of those modules look
> very promising and I never would have found them. :)
> 
> Regards,
> Ben
> 

Not sure what your requirements are, but if you are not stuck on
finding a *binary* representation, you might also want to look at
xdrlib and pickle in the Python standard library.  They both
support serializing and writing Python data structures to files.

And, if you want a persistent, dictionary-like object, see the
shelve module in the Python standard library.

Also, and especially if you are an XML person. you might want to be
aware that there are ways to write (and read) (some? there are
restrictions here, I'm pretty sure.) Python data structures to XML. 
If this is what interests you, go to
http://www.python.org/sigs/xml-sig/, get the PyXML distribution,
then look at:

    /w2/Python/PyXML-0.7/xml/marshal/wddx.py
    /w2/Python/PyXML-0.7/xml/marshal/generic.py

A google search for "wddx faq" will lead you to plenty of
information about WDDX.

  - Dave


-- 
Dave Kuhlman
dkuhlman at rexx.com
http://www.rexx.com/~dkuhlman



More information about the Python-list mailing list