php `exec` calls python script. how return strings from python?
<p>I use <code>exec</code> function calling python script from PHP script. Python writes to standard output two strings which I need in PHP script. The problem is that in these strings could be end of line characters <code>\n</code> ( so formally there are many lines in output), and according to <a href="http://php.net/manual/en/function.exec.php" rel="nofollow"><code>exec</code> manual</a> array <code>$output</code> will contain
each line in it. What is elegant way to escape <code>\n</code> characters so  that <code>$output</code> will contain only two string I want and no post processing of these two string needed?</p>

<p>EDIT: I can change python script.</p>
