[DB-SIG] dbf files and compact indices

M.-A. Lemburg mal at egenix.com
Sun Sep 19 07:04:40 EDT 2010



Ethan Furman wrote:
> Carl Karsten wrote:
>> On Sat, Sep 18, 2010 at 11:23 PM, Ethan Furman <ethan at stoneleaf.us>
>> wrote:
>>> Thanks for the suggestion, but I don't want to be tied to Foxpro, which
>>> means I need to be able to parse these files directly.  I have the dbf
>>> files, now I need the idx and cdx files.
>>
>>
>>
>> What do you mean "tied" ?
> 
> I meant having to have Foxpro installed.  I just learned from another
> reply that I may not have to have Foxpro installed as long as I have the
> Foxpro ODBC driver, because then I could use odbc instead of fiddling
> with the files directly.
> 
> While I may switch over to odbc in the future, I would still like to
> have the idx/cdx components.

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/ or http://dbfpy.sourceforge.net/.

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/

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Sep 19 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the Python-list mailing list