How to call a redis command and send output to a file?
<p>I want to run a redis command using a python script like:</p>

<pre><code>redis-cli hget "User-123"
</code></pre>

<p>And I want the output to be written to a file.</p>

<p>I cannot actually install the redis client because this script has to have no dependancies.  </p>

<p>I have python 2.6.6</p>

<p>Use <a href="https://github.com/andymccurdy/redis-py" rel="nofollow">redis-py</a>, it works with 2.6.  Then use python's builtin <a href="https://docs.python.org/2.6/tutorial/inputoutput.html#reading-and-writing-files" rel="nofollow">file i/o</a> functions to write to a file.</p>

python redis