office-gobmx/pyuno/demo/swritercompclient.py
2003-03-23 11:12:59 +00:00

13 lines
456 B
Python

# instantiating
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( (), )