module for accessing dBase (.dbf) files?

Andy Gimblett gimbo at ftech.net
Wed Mar 20 06:58:51 EST 2002


On Wed, Mar 20, 2002 at 11:51:40AM +0100, Harald Schneider wrote:
> 
> "Ondrej Martinek" <oma at gncz.cz> schrieb im Newsbeitrag
> news:3C725F2C.2020406 at gncz.cz...
> > Hi,
> >
> > anyone knows a python module for accessing dBase .dbf files.  All
> > modules I've found so far didn't support index files.

This dismayed me too until I realised I probably didn't really need
index files.  Of course, it depends on the size of the table in
question, but for my purposes (tables < 10Mb) I got away with just
reading the whole table into memory and sorting it however I wanted
using python's standard .sort() mechanism (using comparison functions
as appropriate).  I used this DBF module:

http://www.vex.net/parnassus/apyllo.py?i=96891420

Of course, YMMV, if you've got 100Mb tables this might well be less
attractive...

Just a thought.

-Andy

-- 
Andy Gimblett - Programmer - Frontier Internet Services Limited
Tel: 029 20 820 044 Fax: 029 20 820 035 http://www.frontier.net.uk/
Statements made are at all times subject to Frontier's Terms and
Conditions of Business, which are available upon request.




More information about the Python-list mailing list