擅长:python、mysql、java
<p>你看过什么例子?在</p>
<p>需要UNO上下文时需要UNO。这允许您在LO或OOo上连接。在</p>
<p>下面是一个小例子,当您需要使用UNO时。在</p>
<pre><code>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 )
ctx = resolver.resolve( "uno:pipe,name=addtemppipe;urp;StarOffice.ComponentContext" )
</code></pre>