Skip to content

Commit

Permalink
fix import of function problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilus committed Dec 28, 2024
1 parent adfc0d9 commit 890e595
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
1 change: 1 addition & 0 deletions lotemplate/connexion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

__all__ = (
'Connexion',
'start_office',
)

import os
Expand Down
19 changes: 0 additions & 19 deletions lotemplate/lofunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,3 @@ def start_multi_office(host:str="localhost",start_port:int=2000,nb_env:int=1):
port=port+1
return soffices

def start_office(host:str="localhost",port:str="2000"):
"""
start one process LibreOffice
:param host: define host in the UNO connect-string --accept
:param port: define port in the UNO connect-string --accept
environnement had to be different for each environnement
"""

subprocess.Popen(
shlex.split('soffice \
-env:UserInstallation="file:///tmp/LibO_Process'+port+'" \
-env:UserInstallation="file:///tmp/LibO_Process'+port+'" \
"--accept=socket,host="'+host+',port='+port+';urp;" \
--headless --nologo --terminate_after_init \
--norestore " '), shell=False, stdin = subprocess.PIPE,
stdout = subprocess.PIPE,)

return host, port,'file:///tmp/LibO_Process'+str(port)

0 comments on commit 890e595

Please sign in to comment.