Search code examples
pythonfoxprodbfvisual-foxpro

What's the easiest way to read a FoxPro DBF file from Python?


I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is there a library to open these in Python? I only need to read them, and would preferably have access to the memo fields too.

Update: Thanks @cnu, I used Yusdi Santoso's dbf.py and it works nicely. One gotcha: The memo file name extension must be lower case, i.e. .fpt, not .FPT which was how the filename came over from Windows.


Solution

  • You can try this recipe on Active State.

    There is also a DBFReader module which you can try.

    For support for memo fields.