Python script to convert DBF database file to CSV
First download dbfpy: http://sourceforge.net/projects/dbfpy/files/latest/download?source=files Then install: sudo python setup.py install To convert DBF file to CSV: ./dbf2csv database.dbf #!/usr/bin/python import csv from dbfpy import dbf import os import sys filename = sys.argv[1] if filename.endswith(‘.dbf’): print «Converting %s to csv» % filename csv_fn = filename[:-4]+ «.csv» with open(csv_fn,’wb’) as csvfile: in_db = dbf.Dbf(filename) out_csv = csv.writer(csvfile)… Leer más »