Python uno aus OpenOffice nutzen
Verfasst: Freitag 25. Juli 2008, 14:55
Hallo Forum,
unter Suse 10.1 habe ich eine normale Pythoninstallation 2.4.2
Die typischen Pfade sind:
python: /usr/bin/python /usr/bin/python2.4 /usr/lib/python /usr/lib/python2.4 /usr/local/lib/python2.4 /usr/include/python2.4 /usr/include/python /usr/share/man/man1/python.1.gz
Wenn man die RPMs von OpenOffice installiert wird im Paket openoffice.org-pyuno ein Python 2.3.4 mitgeliefert und ein Modul names uno. Dieses kann benutzt werden um per Python auf OpenOffice zu connecten wenn OpenOffice als Dienst auf einem Port lauscht.
Wenn man dieses OpenOffice RPM installiert hat man unter:
/opt/openoffice.org2.4/program
eine Struktur wie:
-r--r--r-- 1 root root 1013K 2008-05-29 18:55 libpython2.3.so.1.0
-r--r--r-- 1 root root 177K 2008-05-29 18:55 libpyuno.so
-r--r--r-- 1 root root 3,6K 2008-05-29 18:55 officehelper.py
lrwxrwxrwx 1 root root 9 2008-07-25 15:48 python -> python.sh
-r-xr-xr-x 1 root root 3,1K 2008-05-29 18:56 python.bin
drwxr-xr-x 3 root root 16 2008-07-25 15:48 python-core-2.3.4
-r--r--r-- 1 root root 6,4K 2008-05-29 18:56 pythonloader.py
-r--r--r-- 1 root root 247 2008-05-29 18:56 pythonloader.unorc
-r--r--r-- 1 root root 17K 2008-05-29 18:56 pythonloader.uno.so
-r--r--r-- 1 root root 30K 2008-05-29 18:56 pythonscript.py
-r-xr-xr-x 1 root root 3,2K 2008-05-29 18:56 python.sh
-r--r--r-- 1 root root 3,6K 2008-05-29 18:56 pyuno.so
-r--r--r-- 1 root root 12K 2008-05-29 18:56 unohelper.py
-r--r--r-- 1 root root 13K 2008-05-29 18:56 uno.py
Das Problem ist nun das ich dieses uno auch für mein normales Python nutzen möchte. Zum einen ist es neuer und 2. habe ich mod_python für dieses StandardPython kompiliert.
Ich sehe leider nicht genau durch was wohin muss. Ich hab paar Files nach /usr/lib/python kopiert aber wenn ich im Testscript ein import uno ausführe bekomme ich Fehler das pyuno nicht gefunden werden kann.
Eh ich hier sinnlos Files kopiere und mir alles zusaue dachte ich frag ich lieber mal. Oder könnte ich die Pfade in /opt/... irgendwie in die Python Suchpfade aufnehmen. Leider kenn ich mich mit Python selber nicht so sehr aus und hoffe das mir jemand einen Tipp geben kann. In einem OO Forum hab ich die Frage auch schon gestellt ist aber offenbar Python relevanter als OO.
Danke
Hans
unter Suse 10.1 habe ich eine normale Pythoninstallation 2.4.2
Die typischen Pfade sind:
python: /usr/bin/python /usr/bin/python2.4 /usr/lib/python /usr/lib/python2.4 /usr/local/lib/python2.4 /usr/include/python2.4 /usr/include/python /usr/share/man/man1/python.1.gz
Wenn man die RPMs von OpenOffice installiert wird im Paket openoffice.org-pyuno ein Python 2.3.4 mitgeliefert und ein Modul names uno. Dieses kann benutzt werden um per Python auf OpenOffice zu connecten wenn OpenOffice als Dienst auf einem Port lauscht.
Wenn man dieses OpenOffice RPM installiert hat man unter:
/opt/openoffice.org2.4/program
eine Struktur wie:
-r--r--r-- 1 root root 1013K 2008-05-29 18:55 libpython2.3.so.1.0
-r--r--r-- 1 root root 177K 2008-05-29 18:55 libpyuno.so
-r--r--r-- 1 root root 3,6K 2008-05-29 18:55 officehelper.py
lrwxrwxrwx 1 root root 9 2008-07-25 15:48 python -> python.sh
-r-xr-xr-x 1 root root 3,1K 2008-05-29 18:56 python.bin
drwxr-xr-x 3 root root 16 2008-07-25 15:48 python-core-2.3.4
-r--r--r-- 1 root root 6,4K 2008-05-29 18:56 pythonloader.py
-r--r--r-- 1 root root 247 2008-05-29 18:56 pythonloader.unorc
-r--r--r-- 1 root root 17K 2008-05-29 18:56 pythonloader.uno.so
-r--r--r-- 1 root root 30K 2008-05-29 18:56 pythonscript.py
-r-xr-xr-x 1 root root 3,2K 2008-05-29 18:56 python.sh
-r--r--r-- 1 root root 3,6K 2008-05-29 18:56 pyuno.so
-r--r--r-- 1 root root 12K 2008-05-29 18:56 unohelper.py
-r--r--r-- 1 root root 13K 2008-05-29 18:56 uno.py
Das Problem ist nun das ich dieses uno auch für mein normales Python nutzen möchte. Zum einen ist es neuer und 2. habe ich mod_python für dieses StandardPython kompiliert.
Ich sehe leider nicht genau durch was wohin muss. Ich hab paar Files nach /usr/lib/python kopiert aber wenn ich im Testscript ein import uno ausführe bekomme ich Fehler das pyuno nicht gefunden werden kann.
Eh ich hier sinnlos Files kopiere und mir alles zusaue dachte ich frag ich lieber mal. Oder könnte ich die Pfade in /opt/... irgendwie in die Python Suchpfade aufnehmen. Leider kenn ich mich mit Python selber nicht so sehr aus und hoffe das mir jemand einen Tipp geben kann. In einem OO Forum hab ich die Frage auch schon gestellt ist aber offenbar Python relevanter als OO.
Danke
Hans