Saving Lua output to the Python string
<p>I have a Lua expression, which can print some string. For example: <code>print(1+2)</code>. Then, I call this expression in Python 3 using <a href="https://pypi.python.org/pypi/lupa" rel="nofollow">Lupa</a> library:</p>

<pre><code>import lupa

lua = lupa.LuaRuntime(unpack_returned_tuples=True)
res = lua.eval('print(1+2)')
</code></pre>

<p>Of course, <code>res</code> is <code>None</code> because this expression returns nothing. But <strong>I need to catch the output and save in the variable</strong>. </p>

<p>Is this possible? How can I do this?</p>