On Mon, Nov 9, 2009 at 2:29 AM, Kay Ramme <[email protected]> wrote: > 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? >
It seems as there is a exception in openoffice services. Service terminates without sending back an error message, and its no longer listening on the port. When that happens I get a message on the next oo call that the connection was lost. So at this point I'm looking for a way for oo to tell me that it failed, or look at some log that oo? creates to see why it failed? Is there a log for the headless services oo is running? Thanks, Lucas > 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 <[email protected]> >> 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:[email protected] > 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: [email protected] > For additional commands, e-mail: [email protected] > > -- Setup CalendarServer for your company. http://lucasmanual.com/mywiki/CalendarServer Automotive Recall Database - See if you vehicle has a recall http://lucasmanual.com/recall --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
