[DB-SIG] dbf files and compact indices

Ethan Furman ethan at stoneleaf.us
Sun Sep 19 06:23:21 CEST 2010

Vernon Cole wrote:
> Ethan:
> I cannot see where you mentioned your operating system, I am assuming 
> Windows.
> Perhaps you have already investigated this ... I have no way to test it 
> ... but you might try:
> ADO can access almost any data source, and a quick look seems to show 
> that .dbf is supported using the JET driver or a FoxPro driver.
> 1) upload pywin32
> 2) import adodbapi
> 3) find an appropriate connection string for your data source
> http://connectionstrings.com suggests that perhaps:
> Driver={Microsoft Visual FoxPro 
> Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;Exclusive=No; 
> may be a good sample to start with -- there are other variations, check 
> their site.
> 4) do your data input/output using standard Python db-api calls.
> see python\lib\site-packages\adodbapi\test\ for usage examples
> You can get pywin32 from http://sourceforge.net/projects/pywin32

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.

More information about the Python-list mailing list