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="$OP ENOFFICE_PATH"
export LD_LIBRARY_PATH ="$OPENOFFICE_P ATH"
according to my environment.
importing uno gives me this error: import uno
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/Applications/OpenOffice.org
2.0.app/Contents/openoffice.org2 .0/program/uno.py", line 37, in ?
import pyuno
ImportError: No module named pyuno
which means python finds uno but not pyuno (pyuno.dylib).
Any hints?
Regards, Katja 7 3801
� wrote: 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="$OP ENOFFICE_PATH" export LD_LIBRARY_PATH ="$OPENOFFICE_P ATH" according to my environment.
importing uno gives me this error:
import uno Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Applications/OpenOffice.org 2.0.app/Contents/openoffice.org2 .0/program/uno.py", line 37, in ? import pyuno ImportError: No module named pyuno
which means python finds uno but not pyuno (pyuno.dylib).
Do you want to use system python inside OOo (inside a macro, or...), or
system python outside OOo?
For the first, follow this: http://udk.openoffice.org/python/pyt...html#replacing
for the second: http://udk.openoffice.org/python/pyt...dge.html#modes
Any hints? Regards, Katja
Michele
Hi!
The second way don't run:
Traceback (most recent call last):
File "C:\Program Files\OpenOffic e.org 2.0\program\hel lo_world.py", line 1,
in?
import uno
File "C:\Program Files\OpenOffic e.org 2.0\program\uno .py", line 37, in ?
import pyuno
ImportError: Module use of python23.dll conflicts with this version of
Python.
@+
MCI
Michele Petrazzo schrieb: � wrote:
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_PA TH="/usr/lib/openoffice/program" export PYTHONPATH="$ OPENOFFICE_PATH " export LD_LIBRARY_PA TH="$OPENOFFICE _PATH" according to my environment.
importing uno gives me this error:
>import uno
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Applications/OpenOffice.org 2.0.app/Contents/openoffice.org2 .0/program/uno.py", line 37, in ? import pyuno ImportError: No module named pyuno
which means python finds uno but not pyuno (pyuno.dylib).
Do you want to use system python inside OOo (inside a macro, or...), or system python outside OOo?
For the first, follow this: http://udk.openoffice.org/python/pyt...html#replacing
for the second: http://udk.openoffice.org/python/pyt...dge.html#modes
Any hints? Regards, Katja
Michele
Thanks. What I have in mind is to write a Python script to generate PDFs from a set of ODTs.
This script has to run in Zope which brings its own Python.
My problem is the setup of PyUNO with this Python which is not the OO included one.
Hope to find a Mac user who made/solved similar experience...
Regards, Katja
Méta-MCI schrieb: The second way don't run:
Traceback (most recent call last): File "C:\Program Files\OpenOffic e.org 2.0\program\hel lo_world.py", line 1, in? import uno File "C:\Program Files\OpenOffic e.org 2.0\program\uno .py", line 37, in ? import pyuno ImportError: Module use of python23.dll conflicts with this version of Python.
Sounds like you might want to switch back to Python 2.3 ...
Stefan
Stefan Behnel wrote: M�ta-MCI schrieb: The second way don't run:
Traceback (most recent call last): File "C:\Program Files\OpenOffic e.org 2.0\program\hel lo_world.py", line 1, in? import uno File "C:\Program Files\OpenOffic e.org 2.0\program\uno .py", line 37, in ? import pyuno ImportError: Module use of python23.dll conflicts with this version of Python. Sounds like you might want to switch back to Python 2.3 ...
Yes and no.
I have both 2.3 and 2.4 on my debian system and with both, the program
at: http://udk.openoffice.org/python/samples/ooextract.py
work well with a modify:
before the first line "import uno", add:
import sys
sys.path.append ("/opt/openoffice.org2 .0/program/")
Now, save the program, move it where you want, and go:
michele:~$ python2.3 tmp/ooextract.py --pdf test.odt
michele:~$ python2.4 tmp/ooextract.py --pdf test.odt
Both create the test.pdf file!
P.s. Before execute the script, execute OOo:
soffice "-accept=socket,h ost=localhost,p ort=2002;urp;"
Stefan
Michele
Katja Suess wrote: Thanks. What I have in mind is to write a Python script to generate PDFs from a set of ODTs.
Pay attention that you have a OOo program running somewhere that accept
the connection from your zope server (I don't think that you have a X
server running on it.)
This script has to run in Zope which brings its own Python. My problem is the setup of PyUNO with this Python which is not the OO included one.
Try with the little modify that I wrote and the other post and let us know.
Hope to find a Mac user who made/solved similar experience... Regards, Katja
Michele
hmmmm...
I can run OK "hello_world.py ". But only with Python-core-2.3
Python 2.4 don't run (conflict-version, or windows error).
And, it's not possible to install extensions (like PyWin) to Python-core-2.3
(this destroy the same extensions in my "normal" Python 2.4)
I had let down these aspects of OOo.
*sorry for my bad english*
MCI This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Thomas Guettler |
last post by:
Hi!
The introduction on
http://udk.openoffice.org/python/python-bridge.html
is very good. Nice to see, that python is integrated
into OpenOffice1.1.
Has somone written a script which
converts .swc files to .ps or .pdf?
|
by: Thomas Guettler |
last post by:
Hi!
This script will convert files to PDF with OpenOffice.
Other formats (html, doc ...) should be possible, too.
Have a nice day,
thomas
# OpenOffice1.1 comes with its own python interpreter.
|
by: John Hunter |
last post by:
Does anyone have any example scripts using the OpenOffince
python-bridge module pyuno to load xls, extract the data, and/or save
to another format such as xsc or csv.
Thanks,
JDH
|
by: Philippe C. Martin |
last post by:
I apologize in advance for launching this post but I might get enlightment
somehow (PS: I am _very_ agnostic ;-).
- 1) I do not consider my intelligence/education above average
- 2) I am very pragmatic
- 3) I usually move forward when I get the gut feeling I am correct
- 4) Most likely because of 1), I usually do not manage to fully explain 3)
when it comes true.
- 5) I have developed for many years (>18) in many different environments,...
|
by: Max M |
last post by:
I would like to install several copies of Python 2.4.2 on my machine,
but it doesn't seem to be possible.
If I allready has a version installed, the installer only gives the
options to:
- change python 2.4.2
- repair python 2.4.2
- remove python 2.4.2
| |
by: Sells, Fred |
last post by:
I'm using windows xp and OpenOffice 2.0 and doing my first project with
pyuno.
I've got the basics to work,. An example I googled at
http://blogs.nuxeo.com/sections/aggregators/openoffice_org/blogaggregator_vi
ew?b_start:int=0 imported an ootools module. When I try to import it, it
does not exist,
Does anyone know where this exists, or why I cannot import it.
|
by: Sells, Fred |
last post by:
I can use java to output a PDF file using uno, but when I try to do it in
python, I get an IO Exception with no added information. The relevant code
snippet follows:
from com.sun.star.beans import PropertyValue
PDF = PropertyValue( "FilterName" , 0 , "writer_pdf_Export", 0 )
doc2.storeAsURL("file:///C:/alleclipse/OpenOffice/test2.pdf", (PDF,) )
if I don't specify any properties, it writes an "odt" file just fine, but
when I...
|
by: jayro |
last post by:
Hi people, I need to generate ODT documents from Python so I wonder if there is any module capable to do so.
What I need is to generate an ODT document containing images and text frames with text within. I didn't want to do all the files that form an ODT doc "by hand"...
Can anyone help me?
|
by: DarkBlue |
last post by:
Hello
Python 2.5.1
Qt 4.4.0
PyQt 4.4.2
OO 2.4.1
Firebird 2.1
I want to store an openoffice writer object into a blob field using
the pyuno bridge. I read about the possibility of using streams ,
|
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 project—planning, coding, testing, and deployment—without 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |