Skip to main content

Lua tables in Python

Project description

luatables

Lua tables in Python

Example usage:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

luatables-1.0.1.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

luatables-1.0.1.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page