John Machin sjmachin at
Sun Oct 1 03:21:17 CEST 2006

Sybren Stuvel wrote:
> kenneth.m.mcdonald at 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, 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
> ;-)

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\

# 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)]
on win32

... 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\ 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()

# crash

Has anyone managed to get further than this on Windows (XP Pro, SP 2)?


More information about the Python-list mailing list