Lunatic Python: a two-way bridge between Python and Lua.

Lunatic Python allows Python and Lua to communicate with each other, it allows Lua inside Python and Python inside Lua. This project was born as an experiment, but its already being used in real world projects.

Lunatic Python provides the necessary tools so that Python and Lua interpreters can interact with each other, these tools offer the ability of executing statements inside the interpreter also to acquire individual objects and interact with them inside the native state. Bridging system plays the major role in creating the missing interpreter state inside the host interpreter.Â

When executing Python as the host language Lua functionality is accessed by importing the lua module. When Lua is the host language Lua module will be available in the global Python scope.Â

Objects which are passed in Lunatic Python are encapsulated in the language specific bridging object type, strings and numbers are not encapsulated. Lua has special treatment for encapsulated Python functions and methods. It implements a __call function in

bridging object metatable for calling Python objects inside the Lua interpreter, though this mechanism is not supported in certain situations.

Lunatic Python allows you to integrate features from both languages, so you can use the strengths of both languages.

Reference:

>>Lua Home Page
>>Lunatic Python

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!

Leave a Reply