如何在Python 2.7中访问ODB文件 [英] How to access ODB files in Python 2.7

查看:259
本文介绍了如何在Python 2.7中访问ODB文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Python访问ODB文件(由LibreOffice Base制成)并提取表以备将来使用. ODB包含多个表,一种关系设计和多种形式.

I want to access an ODB file (made with LibreOffice Base) in Python and extract a table for further use. The ODB contains several tables, one relation design and several forms.

是否可以在不使用任何SQL的情况下实现这一目标?

Is it possible to achieve this without using any SQL?

编辑:由于我自己解析这种格式似乎过于复杂,因此我将考虑使用适当的HSQLDB引擎.

Since it seems overcomplicated to parse this format on my own, i'll consider using a proper HSQLDB engine.

通过HSQL访问哪些python模块(就像SQLite的sqlite3一样)?

What python module accesses via HSQL (like sqlite3 for SQLite does)?

推荐答案

您可以考虑 Python示例可以与API进行交互,包括带有示例数据库

You can consider Python Uno API that comes with OpenOffice. There are several Python examples to interact with the API, including one with the sample database

还有一个 SO问题其中解释了如何在LibreOffice中使用uno.

There is also this SO question where it is explained how to use uno with LibreOffice.

这篇关于如何在Python 2.7中访问ODB文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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