Skip to content

91Act/lunatic-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Details

This repo is based on https://github.com/bastibe/lunatic-python which provide a way to run lua script in python.

Main changes from the orignal repo:

  • Support multiple lua states
  • Support multiple return values from lua to python

Works on macOS and Linux.


Installing

git clone https://github.com/91Act/lunatic-python
cd lunatic-python
cmake .
make

Usage

Copy lua.so to one of the python sys.path then:

import lua
lua_state = lua.newState()
lua.execute(lua_state, r'''
    print('hello world!')
''')
lua.closeState(lua_state)

Releases

No releases published

Packages

No packages published

Languages

  • C 53.7%
  • Makefile 40.1%
  • CMake 2.5%
  • Python 2.2%
  • Lua 1.5%