PyUNO with different Python

Katja Suess k.suess at gmx.net
Wed Feb 22 15:37:50 EST 2006


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_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:
>>
>>
>>>>>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/python-bridge.html#replacing
> 
> for the second:
> http://udk.openoffice.org/python/python-bridge.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



More information about the Python-list mailing list