office-gobmx/pyuno/demo/swritercompclient.py
2011-05-07 20:35:03 +01:00

15 lines
561 B
Python

# -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
import uno
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", localContext )
remoteContext = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
remoteSmgr = remoteContext.ServiceManager
pyComp = remoteSmgr.createInstanceWithContext( "org.openoffice.demo.SWriter" , remoteContext )
pyComp.run( (), )
# vim:set shiftwidth=4 softtabstop=4 expandtab: