<div dir="ltr"><div><div>Hello,<br><br></div>I'm trying to call new process with some parameters. The problem is that the last parameter is a "string" that has a lot of spaces and different symbols like slash and so on. I can save it in file and use name of this file as parameter, but my question is: how to make it without   <span id="result_box" class="" lang="en"><span class="">additional saving?</span></span><br>
<br>import subprocess as sp<br><br>rc = sp.Popen(["prog", "--options", "<", msg], stdin=sp.PIPE, stdout=sp.PIPE)<br>stdout = rc.communicate()[0]<br>print stdout<br><br><br><br></div><div>Thank you,<br>
</div><div>Alex<br></div><div><br></div><div>p.s.<br></div>type(msg) => <type 'str'><br></div>