【发布时间】:2012-03-19 16:57:03
【问题描述】:
我可以用套接字连接就好了,但是我听说当一切都在本地时使用管道更快,所以我想尝试一下,但我无法连接。
我从 Libre 开始
> soffice --headless --invisible --norestore --nodefault --nolockcheck --nofirstwizard --accept='pipe,name=ooo_pipe;urp;'
应该工作但不能工作的最简单的python脚本是
import uno
from com.sun.star.connection import NoConnectException
pipe = 'ooo_pipe'
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", localContext)
context = resolver.resolve("uno:pipe,name=%s;urp;StarOffice.ComponentContext" % pipe)
【问题讨论】:
-
你是什么意思不起作用?你希望这个脚本做什么?你看到了什么?
标签: python openoffice.org named-pipes libreoffice uno