Questions tagged [lupa]

Lupa is a rewrite of LunaticPython in Cython with additional features such as proper coroutine support. It integrates the runtimes of Lua or LuaJIT2 into CPython.

Lupa is a rewrite of LunaticPython in Cython with additional features such as proper coroutine support. It integrates the runtimes of Lua or LuaJIT2 into CPython.

Useful links

21 questions
0
votes
1 answer

how do you set up Lupa to restrict access to any Python objects/function from within Lua code?

I want to run user submitted Lua code within Python using Lupa. To do this safely, I want to sandbox the Lua code at source-code level. So far, I've managed to prevent the user-supplied code from accessing any dangerous Lua functions. Now, I want to…
0
votes
0 answers

How can I run untrusted code safely using Lupa?

I'm working on this project where I am using Python + Lupa to run Lua code. I want to run untrusted Lua code (as a string) within my Python script using lupa.LuaRuntime().eval(). I've looked around to see what I need to do to restrict what this Lua…
0
votes
0 answers

how to use setuptools to install lupa with python

when i install lupa happen errors. ENV: python2.7 32bits vcforpython visual studio 2017 errors: C:\Users\wangxin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG…
Wang
  • 1
  • 1
0
votes
0 answers

invoke lua script from python --lupa

This is my lua script local r = {} for _, m in pairs(ARGV) do r[#r+1] = redis.call('SISMEMBER', KEYS[1], m) end return r I have a set data type (redis) where I have added some numbers and using lua script to check if a given list of numbers…
0
votes
0 answers

Stopping infinitive loop in lupa in thread

I have function, which run some unknown code in LuaRuntime in thread, ex def lua(code): lua = LuaRuntime() lua.execute(code) def lua_in_thread(code): t = threading.Thread(target = lua, args = (code,)) t.start() return t Where…
-1
votes
1 answer

Lupa can't find lua on OSX 10.11.4 El Capitan

I'm following official docs to install lupa: brew install lua brew install pkg-config pip install lupa After I run that I can successfully run lua from command line from any folder. However, when running Django management commands (e.g. python…
ozren1983
  • 1,891
  • 1
  • 16
  • 34
1
2