Hi,
were you aware of
http://udk.openoffice.org/python/python-bridge.html#replacing
? It was actually written of OOo 1.1 with python 2.2.2, but should still
be ok for python-2.3.4 and OOo 2.0 in most parts.
I actually don't know this .pth mechanism and have never checked. It
might be, that I do not bootstrap the python runtime correctly in the
loader.
If you like, write your example up cleanly in an issue and assign it to
me ([EMAIL PROTECTED]), but please don't a solution too soon.
Bye,
Joerg
Michele Petrazzo wrote:
I'm trying to use my system python installation instead of OOo python.
After follow the instruction found at
udk.openoffice.org/python/scriptingframework/index.html, I have that OOo
don't find my system python, so after a lot of tries, I'm able to use my
system python installation. These are a simple list of instruction that
I made for do it. I write here because I hope that these can help someone.
su
cd /opt/openoffice.org1.9.xxx/program/
unlink libpython2.3.so
ln -s /usr/lib/libpython2.3.so ./libpython2.3.so
mkdir python-core-system
unlink python-core
ln -s ./python-core-system ./python-core
cd python-core-system
mkdir bin
cd bin
ln -s /usr/bin/python ./python
cd ..
ln -s /usr/lib/python2.3 ./lib
cp pythonloader.unorc pythonloader.unorc.orig
modify pythonloader.unorc and add to PYTHONPATH
$ORIGIN/python-core/lib/site-packages
Only a little question: if I try to import a module present into
site-package with its correspondent .pth file, OOo alert me the the
module xxx are not found, but if import right directory, it work.
Example:
import Image don't work
from PIL import Image work
cat /opt/openoffice.org1.9.91/program/python-core/lib/site-packages/PIL.pth
PIL
import wx don't work
import wx-2.6.1-gtk2-unicode work
cat /opt/openoffice.org1.9.91/program/python-core/lib/site-packages/wx.pth
wx-2.6.1-gtk2-unicode
But if I start a python shell, I can import all the modules!
Thanks,
Michele Petrazzo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]