从 Python 读取 FoxPro DBF 文件的最简单方法是什么? [英] What's the easiest way to read a FoxPro DBF file from Python?

查看:43
本文介绍了从 Python 读取 FoxPro DBF 文件的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Ubuntu 系统上有一堆 FoxPro (VFP9) DBF 文件,是否有可以在 Python 中打开这些文件的库?我只需要阅读它们,并且最好也可以访问备注字段.

I've got a bunch of FoxPro (VFP9) DBF files on my Ubuntu system, is there a library to open these in Python? I only need to read them, and would preferably have access to the memo fields too.

更新:谢谢@cnu,我使用了 Yusdi Santoso 的 dbf.py 并且运行良好.一个问题:备忘录文件扩展名必须是小写的,即 .fpt,而不是 .FPT,这是文件名从 Windows 过来的方式.

Update: Thanks @cnu, I used Yusdi Santoso's dbf.py and it works nicely. One gotcha: The memo file name extension must be lower case, i.e. .fpt, not .FPT which was how the filename came over from Windows.

推荐答案

你可以试试这个 recipe on活动状态.

还有一个 DBFReader 模块 你可以试试.

There is also a DBFReader module which you can try.

支持备注字段.

这篇关于从 Python 读取 FoxPro DBF 文件的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆