How can to glue lua and python

172 views Asked by At

I'm making a DBMS for my father's grocery store, I want to send the bills to the mobile numbers of the customers. So I'm thinking that Lua will handle the app interface and python all the backend work in Solar 2d. But I don't know how to build them together so that they work with each other and no need to start a python interpreter at each session. THIS IS PSEUDOCODE

--lua code 
local py = require("python") -- There I import my python module
local my_file = require("my python file")
 
py.my_file.some_function("some Value")

#then in python after the script run it executes python code 
import my_lua_file_output

def some_function(someValue): # this is the same function used in above lua script 
    my code 

Thank you in Advance.

0

There are 0 answers