Ejecutar LibreOffice como otra instancia

This commit is contained in:
Mauricio Baeza 2018-03-08 14:29:24 -06:00
parent e2da894d8b
commit 001673cdb4
1 changed files with 7 additions and 6 deletions

View File

@ -607,6 +607,10 @@ class LIBO(object):
PORT = '8100'
ARG = 'socket,host={},port={};urp;StarOffice.ComponentContext'.format(
HOST, PORT)
CMD = ['soffice',
'-env:SingleAppInstance=false',
'-env:UserInstallation=file:///tmp/LIBO_Process8100',
'--headless', '--norestore', '--nologo', '--accept={}'.format(ARG)]
def __init__(self):
self._app = None
@ -647,15 +651,12 @@ class LIBO(object):
if self.is_running:
return
c = 1
while c < 4:
c += 1
self.app = subprocess.Popen([
'soffice', '--headless', '--accept={}'.format(self.ARG)],
for i in range(3):
self.app = subprocess.Popen(self.CMD,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
time.sleep(5)
if self.is_running:
return
break
return
def _set_properties(self, properties):