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 > -- 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]
