lupa
lupa copied to clipboard
Lua in Python
My project currently depends on some external lua libraries that I am installing with luarocks. However, since lupa-1.5 now provides wheels on pypi built with the bundled lua-5.3 code I...
```python import lupa lua = lupa.LuaRuntime() lua_func = lua.eval('function(x, y) return x(y) end') class Awd(object): def awd(self, another): return another awd1 = Awd() awd2 = Awd() assert lua_func(awd1.awd, awd2) is...
I have tryed to build the lupa package for anaconda P2.7 64 and pyhon 2.7 64, but without success. I got this error when I use setup.py: ``` build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0x89): undefined...
Currently, a new `_LuaTable` python object is created every time a Lua table is access from Python. This causes a case where the table appears to not be itself: ```...
Here's a simple example: ``` In [16]: copy, proxy = LuaRuntime().execute(""" obj = {foo=123, bar=345} proxy = {} setmetatable(proxy, { __index = function(self, key) return obj[key] end, __newindex = function(self,...
I have this piece of Lua-Torch code and try to put into Python code . I have difficulty to understand the meaning result/process of: = nn.Linear(size1 t2h_d.data.module:share( I would like...
Hey, I didn't found any information regarding Numpy (PyArrayObject), so I guess it's not supported. A translation between Numpy and maybe Torch's Lua Tensor (THTensor) would be nice. Do you...
``` python import lupa lua = lupa.LuaRuntime() lua.require('torch') lg = lua.globals() a = lg.torch.Tensor(2) print(a[5]) # any out of range indexing will cause the core to crash. ``` the output...
Hi there, I'm trying to use lupa with lua installed in a non-standard location. Is it somehow possible to point lupa to that location instead of using the default location?...
LuaJIT 2.0.4 was released recently, it would be nice to have the pypi binary updated to use this version, plus reflect the newest changes (though there arent that many) Thank...