exported.py - handle exported db tables, eg, tab-separated-values, as record sequences. Tab separated value (TSV) format files are a common db-export option, often used for data interchange between database-oriented systems. The TSV class, below, reads and writes a version of TSV, one elaborate enough to provide for any characters, including the delimiter and delimiter-escape characters, within the field values. (In particular, i developed and tested it with TSV files as produced and consumed by Microsoft Outlook.) TSV classes will take their data from a file and/or incrementally, and write back out to another (or the same) file. In between, you can deal with the collection as a sequence of dictionary-like records, adding, deleting, and slicing from the collection. The records themselves are different from regular dictionary objects in that they strictly maintain the number and order of the keys of the underlying database. The TSV class is based on a RecordSequence class, which has everything but the routines (.delimited_to_values() and .values_to_delimited()) to convert to an underlying file format. By defining those routines in a derived class you can adapt the RecordSequence class to other export formats, e.g. comma separated values, another one that's common. While i have not done comma separated values, i do have one other RecordSequence derivative, for something i call line separated values (LSVs). LSVs use newlines instead of tabs to separate records, and blank lines instead of newlines to separate records. While LSV files are a bit larger than their equivalent TSV files, i find them more human readable (that's the reason i developed them) and much easier to parse quickly - so the LSV parser routine is a good bit quicker than the TSV one. See docstrings for TSV and LSV classes for formats. Ken Manheimer, klm@python.org, 12/22/1998