Hi Lukasz,
this is a Python question, right?
Typically connections die, because one of the hosts get disconnected or
one of the applications do terminate.
Do you have a hint, which case is yours?
Regards
Kay
Lukasz Szybalski wrote:
I started using headless package more often, but I'm struggling
through connection problems.
1. How can I debug to see what happened to the connection?
2. Is there some trace other then unexpected connection closure?
3. Is there a way to re-establish the connection, or tell it not to
close but return an error that it can't do something?
Traceback (most recent call last):
File "/usr/local/bin/xyz60.py", line 198, in <module>
cursor2.gotoEnd(False)
__main__.DisposedException: URP_Bridge : disposed
(tid=3) Unexpected connection closure
Thanks,
Lucas
On Tue, Sep 1, 2009 at 2:29 PM, Lukasz Szybalski <szybal...@gmail.com> wrote:
Hello,
Based on some work that was done by
http://www.linuxjournal.com/content/starting-stopping-and-connecting-openoffice-python
I've created a ootools package that allows you to start openoffice in
just 2 lines of python code. It requires openoffice -headless and
oo2.4+. Install it and give it a try.
---How to install it ---
easy_install ootools
or
sudo easy_install ootools
-- How to use it --
python
import ootools
oor=ootools.OORunner()
oor.start()
# open office headless should start on port 8100.
#Check using command: netstat -atpen | grep soffice
#To stop it do:
oor.stop()
-- How to get desktop object --
import ootools
oor=ootools.OORunner()
oor.start()
desktop=oor.connect()
#Do something with the desktop.
#When done
oor.close()
Give it a try and let me know. It works correctly under Debian lenny 32bit.
What os you have system, path to open office,etc.
Thanks,
Lucas
--
Sun Microsystems GmbH Kay Ramme
Sachsenfeld 4 Senior Technical Architect
20097 Hamburg Phone: (+49 40) 23646 982
Germany Fax: (+49 40) 23646 550
http://www.sun.com/staroffice mailto:kay.ra...@sun.com
http://www.sun.com/openoffice
http://udk.openoffice.org
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@udk.openoffice.org
For additional commands, e-mail: dev-h...@udk.openoffice.org