Hi,
I'm trying to understand how can I add "pythonw.exe" shipped with the official python 2.6 distribution to the OOO3's python. I have done some test, for example, copying pythonw.exe to the OOO3 python's, without any success.
Any ideas or useful pointer?
I'm running OOO3 on a winxp system. The official python release I'm using is the 2.6.1, the same of OOO3 one.
Thank you in advance and Happy New Year ,
Simone
[Solved] Adding pythonw.exe to OOo3's python
[Solved] Adding pythonw.exe to OOo3's python
Last edited by Hagar Delest on Fri Jan 08, 2010 12:19 am, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
Openoffice 3.1 on Ubuntu Linux 9.10
OpenOffice 3.1 on windows xp
OpenOffice 3.1 on windows xp
Re: Adding pythonw.exe to OOO3's python
The shipped python.exe (placed in the program directory, not in the python-core-version\bin) with the OOo sets a few environment variables to work correctly.
"PATH" for to find libpyuno.so file and load it to work. "URE_BOOTSTRAP" is used to load UNO components. "UNO_PATH" is used to start OOo, this variable is optional, I think.
You can know these variables on your python like the following code:
I can connect to OOo through another python installation with these variables.
"PATH" for to find libpyuno.so file and load it to work. "URE_BOOTSTRAP" is used to load UNO components. "UNO_PATH" is used to start OOo, this variable is optional, I think.
You can know these variables on your python like the following code:
Code: Select all
import os
print(os.environ['PATH'])
print(os.environ['URE_BOOTSTRAP'])
print(os.environ['UNO_PATH'])
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: Adding pythonw.exe to OOO3's python
Hi Hanya,
thank you for reply!
1. install oo3 on a clean XP machine
2. Install the official python 2.6.4 [1]
3. add vars you indicated to my environment( system properties-variables).
4. start c:\python26\python.exe and c:\python26\pythonw.exe to try "import uno".
Simone
[1] I verified that if you install the official python, when you launch ``c:\programmi\oo3...\program\python.exe``, the python interpreter shows that is using the "python 2.6.4 core" and more the 2.6.1 shipped with ooo3. What version of core shows to you the ooo3's python?
thank you for reply!
Tomorrow I will try to:hanya wrote:The shipped python.exe (placed in the program directory, not in the python-core-version\bin) with the OOo sets a few environment variables to work correctly.
"PATH" for to find libpyuno.so file and load it to work. "URE_BOOTSTRAP" is used to load UNO components. "UNO_PATH" is used to start OOo, this variable is optional, I think.
You can know these variables on your python like the following code:I can connect to OOo through another python installation with these variables.Code: Select all
import os print(os.environ['PATH']) print(os.environ['URE_BOOTSTRAP']) print(os.environ['UNO_PATH'])
1. install oo3 on a clean XP machine
2. Install the official python 2.6.4 [1]
3. add vars you indicated to my environment( system properties-variables).
4. start c:\python26\python.exe and c:\python26\pythonw.exe to try "import uno".
Simone
[1] I verified that if you install the official python, when you launch ``c:\programmi\oo3...\program\python.exe``, the python interpreter shows that is using the "python 2.6.4 core" and more the 2.6.1 shipped with ooo3. What version of core shows to you the ooo3's python?
Openoffice 3.1 on Ubuntu Linux 9.10
OpenOffice 3.1 on windows xp
OpenOffice 3.1 on windows xp
Re: Adding pythonw.exe to OOO3's python
I found that under windows the libpyuno.so is renamed in c:\programmi\OpenOffice.org 3\Basis\program\pyuno.pydhanya wrote:The shipped python.exe (placed in the program directory, not in the python-core-version\bin) with the OOo sets a few environment variables to work correctly.
"PATH" for to find libpyuno.so file and load it to work. "URE_BOOTSTRAP" is used to load UNO components. "UNO_PATH" is used to start OOo, this variable is optional, I think.
Here is what I did (thanks very much hanya for help!)hanya wrote: You can know these variables on your python like the following code:I can connect to OOo through another python installation with these variables.Code: Select all
import os print(os.environ['PATH']) print(os.environ['URE_BOOTSTRAP']) print(os.environ['UNO_PATH'])
1. installed ooo3
2. installed the official python 2.6.4 to c:\python26
3. configured the windows environment ADDING the variables URE_BOOTSTRAP and UNO_PATH and modifying the PATH variable as follows :
Code: Select all
URE_BOOTSTRAP vnd.sun.star.pathname:C:\Programmi\OpenOffice.org 3\program\fundamental.ini
UNO_PATH C:\Programmi\OpenOffice.org 3\program\
PATH C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\python26;C:\Programmi\OpenOffice.org 3\URE\bin;C:\Programmi\OpenOffice.org 3\Basis\program;c:\GTK2\bin;c:\GTK2\lib;
Code: Select all
c:\\programmi\\OpenOffice.org 3\\Basis\program
Simone
Re: [Solved] Adding pythonw.exe to OOo3's python
Hi, has anyone been able to replicate this feat under Mac Os X (Snow Leopard 10.6.2)?
I did as follows:
1) edited environment variables
2) addes uno.pth to /Library/Python/2.6/site-packages/uno.pth with content
at this point I run system default python (snow leopard comes preinstalled with 2.6.1, and when I try "import uno" I get the dreaded
I did as follows:
1) edited environment variables
Code: Select all
UNO_PATH=/Applications/OpenOffice.org.app/Contents/program/
URE_BOOTSTRAP=vnd.sun.star.pathname:/Applications/OpenOffice.org.app/Contents/program/fundamentalrc
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Applications/OpenOffice.org.app/Contents/program:/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/bin
Code: Select all
/Applications/OpenOffice.org.app/Contents/program
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uno
OpenOffice 3.1.1 on MacOS 10.6.2
Re: [Solved] Adding pythonw.exe to OOo3's python
I don't have MacOSX environment but "LD_LIBRARY_PATH" is used on UNIX like environment to find libpyuno.so that is differ with the Windows PATH.
2. Have you tried to add the path to the uno.py manyally?
2. Have you tried to add the path to the uno.py manyally?
Code: Select all
import sys
sys.path.append(path to the directory of the uno.py)
import uno
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04