1bd8ef897SAndrew Rist# ************************************************************* 2bd8ef897SAndrew Rist# 3bd8ef897SAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4bd8ef897SAndrew Rist# or more contributor license agreements. See the NOTICE file 5bd8ef897SAndrew Rist# distributed with this work for additional information 6bd8ef897SAndrew Rist# regarding copyright ownership. The ASF licenses this file 7bd8ef897SAndrew Rist# to you under the Apache License, Version 2.0 (the 8bd8ef897SAndrew Rist# "License"); you may not use this file except in compliance 9bd8ef897SAndrew Rist# with the License. You may obtain a copy of the License at 10bd8ef897SAndrew Rist# 11bd8ef897SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12bd8ef897SAndrew Rist# 13bd8ef897SAndrew Rist# Unless required by applicable law or agreed to in writing, 14bd8ef897SAndrew Rist# software distributed under the License is distributed on an 15bd8ef897SAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16bd8ef897SAndrew Rist# KIND, either express or implied. See the License for the 17bd8ef897SAndrew Rist# specific language governing permissions and limitations 18bd8ef897SAndrew Rist# under the License. 19bd8ef897SAndrew Rist# 20bd8ef897SAndrew Rist# ************************************************************* 21bd8ef897SAndrew Rist 22cdf0e10cSrcweir# instantiating 23cdf0e10cSrcweirimport uno 24cdf0e10cSrcweir 25cdf0e10cSrcweirlocalContext = uno.getComponentContext() 26cdf0e10cSrcweirresolver = localContext.ServiceManager.createInstanceWithContext( 27*d912c6c5SPedro Giffuni "com.sun.star.bridge.UnoUrlResolver", localContext ) 28cdf0e10cSrcweirremoteContext = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" ) 29cdf0e10cSrcweirremoteSmgr = remoteContext.ServiceManager 30cdf0e10cSrcweir 31cdf0e10cSrcweirpyComp = remoteSmgr.createInstanceWithContext( "org.openoffice.demo.SWriter" , remoteContext ) 32cdf0e10cSrcweir 33cdf0e10cSrcweirpyComp.run( (), ) 34