[DB-SIG] dbf files and compact indices

Ethan Furman ethan at stoneleaf.us
Sun Sep 19 14:45:54 EDT 2010


M.-A. Lemburg wrote:
> If you are working on Windows, you can install the MS MDAC package to
> get a hold of the MS FoxPro ODBC drivers. They are usually already installed
> in Vista and 7, in XP they comes with MS SQL Server and MS Office as
> well. mxODBC can then provide Python access on Windows, mxODBC Connect
> on other platforms.
> 
> If you want direct files access on other platforms, you can use
> http://pypi.python.org/pypi/dbf/
                  ^--- I'm the author if this package  :)

> or http://dbfpy.sourceforge.net/.
                  ^--- from the quick skim of the code, I think mine 
does more at this point (memos, adding/deleting/renaming fields in 
existing tables, in-memory indexes, unicode support, export to 
csv,tab,fixed formats, field access via attribute/dictionary/index style 
(e.g. table.fullname or table['fullname'] or table[0] if fullname is the 
first field), very rudimentary sql support, etc.)

> If you want to add support for index files (which the above two don't
> support), you could also have a look at this recipe for some
> inspiration:
> 
> http://code.activestate.com/recipes/362715-dbf-reader-and-writer/

I didn't see anything regarding the .idx or .cdx files in this recipe.  :(

Thanks for your time, though!
--
~Ethan~



More information about the Python-list mailing list