@setori88: You should not modify neither redirect.ini nor soffice.ini
(likely, OOo will not work at all if you do so). Rather, in the
environment where you start OOo's python.exe, you need to set the
environment variable URE_BOOTSTRAP, to either something like either
file:///C:/Program%20Files/OpenOffice.org%203/program/fundamental.ini
or
vnd.sun.star.pathname:C:\Program Files\OpenOffice.org
3\program\fundamental.ini
(adapted to your actual OOo installation path).
@jbu: However, when I try the scenario described by setori88 on a Win
XP box (execute
[C:\] "C:\Program Files\OpenOffice.org 3\program\swriter.exe"
-accept=socket,host=localhost,port=2002;urp
[C:\] set URE_BOOTSTRAP=vnd.sun.star.pathname:C:\Program
Files\OpenOffice.org 3\program\fun
[C:\] "C:\Program Files\OpenOffice.org 3\program\python.exe"
C:\hello_world.py
where hello_world.py is as given at
<http://udk.openoffice.org/python/python-bridge.html>) I get the error
Traceback (most recent call last):
File "C:\\hello_world.py", line 11, in ?
ctx = resolver.resolve(
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
__main__.com.sun.star.connection.NoConnectException: Connector :
couldn't connect to socket (WSANOTINITIALISED, WSAStartup() has not been
called)
instead. Seen that before? Any idea whether it is a fault of
python.exe or of URE?
Also, I have to admit I lost track why the problem of python.exe not
working on Windows due to missing URE_BOOTSTRAP exists at all. On Unix,
we solved the problem (at least for those OOo builds that use OOo's own
python executable, not a system one) with an appropriate python shell
script wrapper around a python.bin. On Windows, such a wrapper appears
to be missing. Was that an oversight, or did we have any reason to do
it that way? Does an issue exist for this problem?
-Stephan
On 10/16/08 06:04, setori88 wrote:
[...]
I still cant get point 4 to work properly.
here is what I am doing:
- after i change office/program/redirect.ini
[Bootstrap]
URE_BOOTSTRAP=fundamental.ini
(it was URE_BOOTSTRAP=${ORIGIN}/fundamental.ini)
- I also change office/program/soffice.ini
[Bootstrap]
Logo=1
ProgressBarColor=4,68,155
ProgressFrameColor=58,159,232
ProgressPosition=14,230
ProgressSize=412,7
URE_BOOTSTRAP=fundamental.ini
HideEula=1
(it was URE_BOOTSTRAP=${ORIGIN}/fundamental.ini)
- run soffice "-accept=socket,host=localhost,port=2002;urp;"
- the helloworld.py script is in the office/program dir.
which is a copy and paste of
http://udk.openoffice.org/python/python-bridge.html helloworld.py example
- I call "python helloworld.py" (using openoffice's python) from
office/program dir
I get the error no 4's error
AttributeError: getCurrentComponent
[...]
Jörg Budischewski wrote:
[...]
4) (windows only) The python program crashes or you get an attribute error
AttributeError: getCurrentComponent (or some other attribute)
This is because the types could not be loaded due to changes in the uno
bootstrapping mechanism. You can work around it for now by setting the
variable set URE_BOOTSTRAP=fundamental.ini
and running python from the
path/to/office/OpenOffice.org 3/programdirectory.
[...]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]