<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Python // officehelper.py misbehaves since 5.3.7"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=116156#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Python // officehelper.py misbehaves since 5.3.7"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=116156">bug 116156</a>
              from <span class="vcard"><a class="email" href="mailto:mini-matze@web.de" title="mini-matze@web.de">mini-matze@web.de</a>
</span></b>
        <pre>I think a more better solution were to use subprocess instead of the "old"
os.spawn. So we need not care about quoting (and to set it as first arg, too).

add to imports:
from subprocess import Popen

Then we need to replace the process creation:
replace:
    os.spawnv(os.P_NOWAIT, sOffice, cmdArray)
with:
    Popen( cmdArray )


Or alternativ (because the first arg is the path to use - it's cleaner):
replace:
    cmdArray = (sOffice, "--nologo", "--nodefault",
"".join(["--accept=pipe,name=", sPipeName, ";urp;"]))
    os.spawnv(os.P_NOWAIT, sOffice, cmdArray)
with:
    cmdArray = ("--nologo", "--nodefault", "".join(["--accept=pipe,name=",
sPipeName, ";urp;"]))
    Popen( (sOffice,) + cmdArray )


Hope this helps...</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>