title: Cannot execute lua code, read from file
body: <p>I have some sample of lua code. For example:</p>
  
  <pre><code>for i=1,4 do
     print(i)
  end
  </code></pre>
  
  <p>and I need to execute it using <a href="https://pypi.python.org/pypi/lupa" rel="nofollow">Lupa</a> library on Python 3.4.</p>
  
  <p>For doing this, I have write the following code:</p>
  
  <pre><code>import lupa
  lua = lupa.LuaRuntime(unpack_returned_tuples=True)
  lua.eval(open('test.lua').read())
  </code></pre>
  
  <p>where <code>test.lua</code> is a my sample lua file.</p>
  
  <p>But if I try to execute this code, I get following:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Job/HW-2/testing/test1.py", line 3, in &lt;module&gt;
      lua.eval(open('test.lua').read())
    File "lupa/_lupa.pyx", line 251, in lupa._lupa.LuaRuntime.eval (lupa/_lupa.c:4579)
    File "lupa/_lupa.pyx", line 1250, in lupa._lupa.run_lua (lupa/_lupa.c:18295)
  lupa._lupa.LuaSyntaxError: error loading code: [string "&lt;python&gt;"]:1: unexpected symbol near 'for'
  </code></pre>
  
  <p>It seems, this is a very simple issue, but I don't know how to fix it. So, how I can execute Lua file on Python 3 using Lupa?</p>