Skip to content

Instantly share code, notes, and snippets.

@gregjurman
Created December 8, 2013 02:53
Show Gist options
  • Save gregjurman/7852827 to your computer and use it in GitHub Desktop.
Save gregjurman/7852827 to your computer and use it in GitHub Desktop.
Open Paradox 3.5 DB, extract field headers and write a proper CSV
import pxpy
import csv
t = pxpy.Table("HISTORY.DB")
t.open()
headers = map(pxpy.RecordField.getName, t[0])
with open('history.csv', 'wb') as out_file:
c = csv.writer(out_file)
c.writerow(headers)
for r in t:
c.writerow(map(pxpy.RecordField.getValue, r))
t.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment