Python/UNO/OpenOffice?

Discussion in 'Python' started by kenneth.m.mcdonald@sbcglobal.net, Sep 30, 2006.

  1. Guest

    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.

    Thanks,
    Ken
    , Sep 30, 2006
    #1
    1. Advertising

  2. gregarican Guest

    Just because the last code update was a little over a year ago doesn't
    mean the UNO project is dead. If the OpenOffice API has remained
    basically the same since UNO was last updated and the Python wrappers
    are relatively comprehensive then it should fit the bill. Googling
    around the UNO project was the only thing I found off-hand as well...

    wrote:
    > 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.
    >
    > Thanks,
    > Ken
    gregarican, Sep 30, 2006
    #2
    1. Advertising

  3. Gary Herron Guest

    wrote:
    > 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.
    >
    > Thanks,
    > Ken
    >

    I don't believe that information is out-of-date. I use the python-bridge
    with the OpenOffice version 2.0.3 quite successfully. In my case I open
    a spread sheet and search around for and extract various values. It
    works just fine for me.

    Gary Herron
    Gary Herron, Sep 30, 2006
    #3
  4. gregarican Guest

    That's what I would imagine. Kind of like calling some Microsoft Office
    COM/OLE methods in a wrapper. As long as the wrapper has most of the
    methods you need and the core COM/OLE calls don't change then that's a
    great start.

    Gary Herron wrote:
    > wrote:
    > > 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.
    > >
    > > Thanks,
    > > Ken
    > >

    > I don't believe that information is out-of-date. I use the python-bridge
    > with the OpenOffice version 2.0.3 quite successfully. In my case I open
    > a spread sheet and search around for and extract various values. It
    > works just fine for me.
    >
    > Gary Herron
    gregarican, Sep 30, 2006
    #4
  5. Sybren Stuvel, Sep 30, 2006
    #5
  6. John Machin Guest

    Sybren Stuvel wrote:
    > 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
    dlls.

    The following interactive session reproduces the problem:

    | C:\Program Files\OpenOffice.org
    2.0\program\python-core-2.3.4\bin>python

    # 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
    information.
    | >>> 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
    files

    | >>> 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)?

    Cheers,
    John
    John Machin, Oct 1, 2006
    #6
  7. John Machin enlightened us with:
    > 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 dlls.


    That's not nice.

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


    Not me - I'm not using Windows. If anyone knows more about this,
    please post here or post a comment at
    http://www.stuvel.eu/archive/31/article-about-openofficeorg-and-python
    so that I can improve the article.

    Sybren
    --
    Sybren Stüvel
    Stüvel IT - http://www.stuvel.eu/
    Sybren Stuvel, Oct 1, 2006
    #7
  8. olive Guest

    For me the problem is that OO2.0 is compiled against P2.3.

    Is there any OO compiled with P2.4x for Windows somewhere ?

    Sybren Stuvel wrote:
    > 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 ;-)
    olive, Oct 2, 2006
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sells, Fred

    OpenOffice UNO export PDF help needed

    Sells, Fred, Apr 30, 2006, in forum: Python
    Replies:
    1
    Views:
    727
    Michele Petrazzo
    May 1, 2006
  2. Colin J. Williams

    Re: Python/UNO/OpenOffice?

    Colin J. Williams, Oct 2, 2006, in forum: Python
    Replies:
    5
    Views:
    546
    Sybren Stuvel
    Oct 2, 2006
  3. Sells, Fred
    Replies:
    2
    Views:
    274
    Thomas Guettler
    Jan 22, 2007
  4. Nicola Larosa

    [PyCon Uno Italy] Call For Papers

    Nicola Larosa, Apr 26, 2007, in forum: Python
    Replies:
    0
    Views:
    254
    Nicola Larosa
    Apr 26, 2007
  5. Replies:
    0
    Views:
    362
Loading...

Share This Page