An open API service indexing awesome lists of open source software.

https://github.com/skythecodemaster/python-lua-tables

Lua tables in Python
https://github.com/skythecodemaster/python-lua-tables

Last synced: about 2 months ago
JSON representation

Lua tables in Python

Awesome Lists containing this project

README

        

# luatables
Lua tables in Python

# Example usage:
```py
from luatable import Table

tbl = Table()
tbl["x"] = 5
tbl.y = 45

print(tbl) #> {'x': 5, 'y': 45}
print(tbl.x) #> 5

tbl.z = {}
tbl.z.hi = "Hi!"

print(tbl) #> {'x': 5, 'y': 45, 'z': {'hi': 'Hi!'}}
print(tbl.z.hi) #> "Hi!"

print(tbl["z"]["hi"]) #> "Hi!"
```
These function identically to Lua tables, except that metatables are not supported.