lua

Python equivalent of lua bit32.bxor

Python equivalent of lua bit32.bxor Question: I am trying to "convert" a lua script into a python script, but the lua script seems to have a library named bit32, and of which it uses the bxor function. Is there any python equivalent of the bit32.bxor function? I have searched multiple times on stackoverflow and google …

Total answers: 3

What's the Python equivalent to iterating over a defined table in Lua?

What's the Python equivalent to iterating over a defined table in Lua? Question: I am very new to learning Python as I have just moved from Lua. One of my questions though, is how do I iterate over a table with a given set of different values? I have tried looking on other forums, but …

Total answers: 1

serialize a dict as lua table

serialize a dict as lua table Question: Converting .lua table to a python dictionary inquires about converting a lua table to a python dict that can be loaded with loadstring/loadfile. The answer’s suggested a library which also supports conversion the other way around, however it is no longer maintained nor supported python3. I was unable …

Total answers: 1

Function that does nothing in Lua

Function that does nothing in Lua Question: I’ve recently started learning Lua. The only other programming language I have some experience in is Python. In Python there is the “pass” function that does nothing. I was wondering what the equivalent (if any) of this would be in Lua. Asked By: InTheory || Source Answers: In …

Total answers: 2

Lua equivalent to shlex?

Lua equivalent to shlex? Question: Is there a Lua equivalent for python’s shlex library? Asked By: RCIX || Source Answers: I found a reference to a project called LuaParse: LuaParse includes Blex, a general purpose pure-Lua lexer, and lparse, a pure-Lua Lua parser, as well as a variety of utility functions and a prototype package …

Total answers: 5

Lua as a general-purpose scripting language?

Lua as a general-purpose scripting language? Question: When I see Lua, the only thing I ever read is “great for embedding”, “fast”, “lightweight” and more often than anything else: “World of Warcraft” or in short “WoW”. Why is it limited to embedding the whole thing into another application? Why not write general-purpose scripts like you …

Total answers: 11