title: Using soffice within python, Command works in terminal but not in Python subprocess
body: <p>I am having the most frustrating problem with libreoffice in Python </p>
  
  <p>when I run the following in terminal I have no problem at all, the pdf file is produced where I want it and life is dandy:</p>
  
  <pre><code>cd /Applications/LibreOffice.app/Contents/MacOS/
  
  ./soffice --convert-to pdf --outdir {output_folder} {path_to_docx_file}/{title}.docx
  </code></pre>
  
  <p>However when I have tried to add this to my python script:</p>
  
  <pre><code>SOFFICE = r'/Applications/LibreOffice.app/Contents/MacOS/soffice'
  
  subprocess.Popen([SOFFICE, "--convert-to", "pdf", "--outdir", "{output_folder} ", "{path_to_docx_file}/{title}.docx"])
  </code></pre>
  
  <p>I get an error saying : </p>
  
  <blockquote>
    <p>Error: source file could not be loaded</p>
  </blockquote>
  
  <p>I have tried opening up all the permissions of all of the binaries and files and this still doesn't work in the python script. What am I doing wrong? </p>