Problem passing bash output to a python script <p>I'm fairly new to programming and I searched the internet for a way to pass bash output to a Python script.</p> <p>I came up with this in bash.</p> <pre><code>XAS_SVN=`svn info` ssh hudson@test "python/runtests.py $XAS_SVN" </code></pre> <p>And this in python.</p> <pre><code>import sys print sys.argv[1] </code></pre> <p>When I <code>echo $SVN_INFO</code> I get the result.</p> <blockquote> <p>Path: . URL: //svn/rnd-projects/testing/python Repository Root: //svn/rnd-projects Repository UUID: d07d5450-0a36-4e07-90d2-9411ff75afe9 Revision: 140 Node Kind: directory Schedule: normal Last Changed Author: Roy van der Valk Last Changed Rev: 140 Last Changed Date: 2009-06-09 14:13:29 +0200 (Tue, 09 Jun 2009)</p> </blockquote> <p>However the python script just prints the following.</p> <blockquote> <p>Path:</p> </blockquote> <p>Why is this and how can I solve this? I the $SVN_INFO variable not of string type?</p> <p>I know about the subprocess module and the Popen function, but I don't think this is a solution since the python script runs on another server.</p>