Carregando um documento no OpenOffice usando um programa Python externo

Estou tentando criar um programa python (usando pyUNO) para fazer algumas alterações em uma planilha de cálculo do OpenOffice.

Lancei anteriormente o OpenOffice no modo "aceitar" para poder conectar-me a partir de um programa externo. Aparentemente, deve ser tão fácil quanto:

import uno
# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()

# create the UnoUrlResolver
resolver = localContext.ServiceManager.createInstanceWithContext(
                            "com.sun.star.bridge.UnoUrlResolver", localContext)

# connect to the running office
ctx = resolver.resolve("uno:socket,host=localhost,port=2002;"
                       "urp;StarOffice.ComponentContext")
smgr = ctx.ServiceManager

# get the central desktop object
DESKTOP =smgr.createInstanceWithContext("com.sun.star.frame.Desktop", ctx)

#The calling it's not exactly this way, just to simplify the code
DESKTOP.loadComponentFromURL('file.ods') 

Mas eu recebo umAttributeError quando tento acessarloadComponentFromURL. Se eu fizer umadir(DESKTOP), Vi apenas os seguintes atributos / métodos:

['ActiveFrame', 'DispatchRecorderSupplier', 'ImplementationId', 'ImplementationName',
'IsPlugged', 'PropertySetInfo', 'SupportedServiceNames', 'SuspendQuickstartVeto', 
'Title', 'Types', 'addEventListener', 'addPropertyChangeListener', 
'addVetoableChangeListener', 'dispose', 'disposing', 'getImplementationId', 
'getImplementationName', 'getPropertySetInfo', 'getPropertyValue', 
'getSupportedServiceNames', 'getTypes', 'handle', 'queryInterface', 
'removeEventListener', 'removePropertyChangeListener', 'removeVetoableChangeListener', 
'setPropertyValue', 'supportsService']

Eu li que há um bug que faz o mesmo, mas no OpenOffice 3.0 (estou usando o OpenOffice 3.1 sobre o Red Hat5.3). Eu tentei usar a solução alternativa declaradaaqui, mas eles não parecem estar funcionando.

Alguma ideia?

questionAnswers(2)

yourAnswerToTheQuestion