473,883 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python/UNO/OpenOffice?

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 '06 #1
7 3691
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...

ke************* ***@sbcglobal.n et 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
Sep 30 '06 #2
ke************* ***@sbcglobal.n et 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

Sep 30 '06 #3
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:
ke************* ***@sbcglobal.n et 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
Sep 30 '06 #4
ke************* ***@sbcglobal.n et 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 ;-)

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Sep 30 '06 #5
Sybren Stuvel wrote:
ke************* ***@sbcglobal.n et 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\OpenOffic e.org
2.0\program\pyt hon-core-2.3.4\bin>pytho n

# 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.appe nd(r'C:\Program Files\OpenOffic e.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.getCompon entContext()

# crash

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

Cheers,
John

Oct 1 '06 #6
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/arti...org-and-python
so that I can improve the article.

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Oct 1 '06 #7
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 ;-)
Oct 2 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2357
by: beliavsky | last post by:
Is it possible to call a Python function from Calc (the Open Office spreadsheet) or Microsoft Excel? Are their web sites or books describing how to do this? I would prefer not to write any more VBA :).
32
8113
by: Mike Cox | last post by:
As you may or may not know, Microsoft is discontinuing Visual Basic in favor of VB.NET and that means I need to find a new easy programming language. I heard that Python is an interpreted language similar to VB. This means that it doesn't have all the hard stuff like pointers, classes and templates like C, C++ and assembly language. Where I work we use Microsoft Office with a lot of customization using Visual Basic. I would like to...
6
3595
by: Wolfgang Keller | last post by:
Hello, I'm looking for a spreadsheet application (MacOS X prefered, but Windows, Linux ar available as well) with support for Python scripting (third-party "plug-ins" are ok) and a database interface. Applications that I know of (that they exist) are: MS Excel Quattro
7
3823
by: Katja Sss | last post by:
Hi! maybe somebody can give me an hint to my problem setting up PyUNO on my Mac to work with my Python not the Python delivered with OpenOffice. As said in installation instructions I've set OPENOFFICE_PATH="/usr/lib/openoffice/program" export PYTHONPATH="$OPENOFFICE_PATH" export LD_LIBRARY_PATH="$OPENOFFICE_PATH" according to my environment. importing uno gives me this error:
40
2265
by: tleeuwenburg | last post by:
Greetings all, Some of you may have noticed the launch of the Python Journal a while back. Due to artistic differences, the journal has now been re-launched as The Python Papers. It is available under a Creative Commons License, something we felt was appropriate given its nature. Many here commented that this was important to them, and it is important to us also. For a fuller description of what we hope the journal to be, I re-create...
12
2972
by: Tony Belding | last post by:
I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I can find one that does everything I need. The MUCK must be able to call the interpreter and execute scripts with it, but the interpreter must also be able to call functions in the MUCK code. And then there's the security issue that really worries me. . . I have to be able to limit what the interpreter...
7
2257
by: PaoloB | last post by:
Hi everyone, during our development, we need to write some unit tests that interact with OpenOffice through pyUno. Is there anyone who has got any experience on it? As OpenOffice is quite a large beast, and interaction is rather complex, I would like to know if there is someone who is willing to share experience (and, possibly, code).
9
3349
by: Marco Bizzarri | last post by:
On Wed, Sep 10, 2008 at 10:04 PM, Greg Lindstrom <gslindstrom@gmail.comwrote: Ciao, Greg. you should check with the openoffice.org mailing list; I think what you are looking for is the api mailing list for openoffice; you could try to get the OpenOffice.org developers guide and the SDK, and check it (but it is not a little work) Regards
1
1820
by: Lawrence D'Oliveiro | last post by:
Has anyone been able to run user-defined Python macros in OpenOffice.org 3.0? I had one in ~/.ooo-2.0/user/Scripts/python/try.py which did work under Ooo2.x. So I put the same thing in ~/.ooo3/user/Scripts/python/, but it will not show up in any macro dialog in Ooo 3.0. The provided example macros seem to work: under the "Tools -Macros -> Organize Macros -Python..." menu, there is an entry named "OpenOffice.org Macros", and I can run the...
0
9948
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
11164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10767
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9588
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7980
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7137
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6008
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.