lupa icon indicating copy to clipboard operation
lupa copied to clipboard

Lua in Python

Results 82 lupa issues
Sort by recently updated
recently updated
newest added

Hi, My lua version is 5.2.But when I execute `lua.require('socket')`, out : LuaError: module 'socket' not found: no field package.preload['socket'] no file './socket.lua' no file '/usr/share/luajit-2.0.0-beta9/socket.lua' no file '/usr/local/share/lua/5.1/socket.lua' no...

Test: https://github.com/scoder/lupa/blob/c08bf6e6a853a56858e0dc219ba6bcfa99bcaef0/lupa/tests/test.py#L556. It is an old issue; I opened a ticket to make it more visible.

What do you think about adding `_LuaTable.looks_like_array(max_sparse_ratio=1.0)` and `_LuaTable.to_list()` methods? `_LuaTable.looks_like_array()` may do something along the lines of https://github.com/mpx/lua-cjson/blob/d59326b2d718e1a140b9b396ffe0a557b2d93fe0/lua_cjson.c#L491 `_LuaTable.to_list()` may return a Python list (tbl[1] == lst[0]), replacing nil...

it's error when pickle.dumps(lupa.LuaRunTime().table(1,23)) how can pickle lua table??

help wanted

Dear contributers, dear community, I'd like to build a web-application in python that can be extended using lua scripts. These extensions are contributed by affiliated developers, and in general, their...

``` >>> import lupa; lua = lupa.LuaRuntime() >>> pcall = lua.eval("pcall") >>> def py_func(): raise Exception("python exception") ... >>> lua_func = lua.eval("function () error('lua error') end") >>> pcall(lua_func) (False, u'[string...

So I was trying to use this with hexchat and this happened: ``` python >>> import lupa; lua = lupa.LuaRuntime(unpack_returned_tuples=False, encoding=None) >>> exec("def x(*args):\n hexchat.prnt(*([x.decode(\"utf-8\") for x in args]))\n\nlua.globals().print =...

Would it be possible to implement a timeout for running a function? I'm running untrusted, sandboxed code, and I need the execution of functions to be limited. Do you have...

help wanted

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. - `python3 -sBm...

C:\Users\Ирбис>python ide.py Version Lua(5.3 or 5.4): Sorry, by default Lua 5.4 Using Lua 5.4 (compiled with (5, 4)) All commands: 1. console - terminal lua 2. run - run code...