Using Python to write dbf table with fpt memos -
i have legacy application uses .dbf , .fpt files. looking read , write files, have figured out way write these files not using fpt memos. using python 2.7.2 , dbf module 0.95.02. when try use dbf module error when trying use fptable.
>>> import dbf >>> table = dbf.fptable('test','name c(25); age n(3,0); qualified m') >>> table traceback (most recent call last): file "<stdin>", line 1, in <module> file "/users/doctor/.virtualenvs/dbf/lib/python2.7/site-packages/dbf.py", line 4428, in __repr__ return __name__ + ".table(%r, status=%r)" % (self._meta.filename, self._meta.status) file "/users/doctor/.virtualenvs/dbf/lib/python2.7/site-packages/dbf.py", line 4213, in __getattr__ return object.__getattribute__(self, name) attributeerror: 'db3table' object has no attribute '_meta' >>> table.open() traceback (most recent call last): file "<stdin>", line 1, in <module> file "/users/doctor/.virtualenvs/dbf/lib/python2.7/site-packages/dbf.py", line 4953, in open meta = self._meta file "/users/doctor/.virtualenvs/dbf/lib/python2.7/site-packages/dbf.py", line 4213, in __getattr__ return object.__getattribute__(self, name) attributeerror: 'db3table i looking create read , write dbf files fpt memos. ability create index files .cdx ideal. open way of above.
short answer don't use fptable directly. should able to, i've never tried since use table(name, fields, dbf_type='fp').
thanks round-a-bout bug report. ;)
Comments
Post a Comment