sjmachin at lexicon.net
Sun Oct 1 03:21:17 CEST 2006
Sybren Stuvel wrote:
> kenneth.m.mcdonald at sbcglobal.net enlightened us with:
> > Are then any currently active and reasonably mature Python plugins/
> > apis/whatever for programming/scripting OpenOffice? The page I've
> > found is http://udk.openoffice.org/python/python-bridge.html, but it
> > was last updated more than a year ago.
> Aside from what has already been said, it might be nice for you to
> read my article about OOo and Python at
> http://www.stuvel.eu/ooo-python ;-)
Hi, Sybren. I tried folloing your recipe on Windows with OOo 2.0 ...
Minor problem: the executable is called soffice, not ooffice.
Major problem: it crashed right at the start, somewhere in the maze of
The following interactive session reproduces the problem:
| C:\Program Files\OpenOffice.org
# OOo includes a complete python distribution. Note the directory name
says 2.3.4 ...
| Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)]
... but the program identifies itself as 2.3.5
| Type "help", "copyright", "credits" or "license" for more
| >>> import sys
| >>> sys.path.append(r'C:\Program Files\OpenOffice.org 2.0\program')
# The above directory contains all the dlls plus a handful of python
| >>> import pyuno # from pyuno.dll; there's no other pyuno.*
| >>> _g_ctx = pyuno.getComponentContext()
Has anyone managed to get further than this on Windows (XP Pro, SP 2)?
More information about the Python-list