How to embed Lua inside Python?

后端 未结 1 1469
情深已故
情深已故 2021-02-04 06:33

This sounds like a weird question, so I\'ll explain circumstances surrounding first.

Basically, I have a 3D game development kit, written in Python, that works excellent

相关标签:
1条回答
  • 2021-02-04 07:02

    you should look into lunatic-python it is a 2 way bridge between python and lua.

    an example off the site shows how natural and easy it is:

    >>> import lua
    >>> lg = lua.globals()
    >>> lg.string
    <Lua table at 0x81c6a10>
    >>> lg.string.lower
    <Lua function at 0x81c6b30>
    >>> lg.string.lower("Hello world!")
    'hello world!'
    
    0 讨论(0)
提交回复
热议问题