2
我在使用老式FoxPro2.x表格的Python 2.7中使用Ethan Furman版本0.96.005(最新版本)中的dbf-module。由于我想忽略已删除的记录,因此我在分配tbl = dbf.Table(dbf_path)
后设置了tbl.use_deleted = False
。我试图在打开表with tbl.open('read-only') as tbl: ...
之前和之后设置这个,但是 这两个都没有任何影响。如何在python中使用dbf-module来忽略已删除的记录?
在创纪录的水平我想:
for rec in tbl:
if not rec.has_been_deleted and ...
但是这给了我:
FieldMissingError: 'has_been_deleted: no such field in table'
我做某事物错误?或者该功能不再可用(因为它是5年前 - 请参阅Visual Fox Pro and Python)?