On 3/7/2011 4:50 AM, Bob Fnord wrote:

I want a portable data file (can be moved around the filesystem
or copied to another machine and used),

Used only by Python or by other software?

Would a database in a file have any advantages over a file made
by marshal or shelve?

If you have read the initial paragraphs of the marshal doc and your needs fit within its limitations, go ahead and use it. (Also note that Python could switch to a new version in the future.)

Keyed databases have the advantage that you can change the data file. If you do not need to do that (as opposed to read in, do whatever, and write out in entirety) then that is no advantage to you.

Similar to marshal is json, which is more limited but more portable, because understood by other languages.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to