background preloader

Language variations

Facebook Twitter

FePy - IronPython Cookbook. PyMitePyMite. Python Programming Language -- Official Website. Flex-pypy - Google Code. Lunatic Python. Introduction Lunatic Python is a two-way bridge between Python and Lua, allowing these languages to intercommunicate. Being two-way means that it allows Lua inside Python, Python inside Lua, Lua inside Python inside Lua, Python inside Lua inside Python, and so on.

Why? Even though the project was born as an experiment, it's already being used in real world projects to integrate features from both languages. Please, let me know if you use it in real world projects. Examples Lua inside Python A basic example. >>> import lua >>> lg = lua.globals() >>> lg.string <Lua table at 0x81c6a10> >>> lg.string.lower <Lua function at 0x81c6b30> >>> lg.string.lower("Hello world! ") Now, let's put a local object into Lua space. Can we get the reference back from Lua space? >>> d2 = lua.eval("d") >>> d is d2 True Good! >>> lua.eval("python") <Lua table at 0x81c7540> Yes, it looks so. Are you still following me?

Good. Things get more interesting when we start to really mix Lua and Python code. Python inside Lua Good.