Re: running Lua in Python

Discussion in 'Python' started by Ian Kelly, Sep 2, 2012.

  1. Ian Kelly

    Ian Kelly Guest

    On Sun, Sep 2, 2012 at 3:04 AM, Arnaud Delobelle <> wrote:
    > Hi all,
    >
    > I'm looking for a way to run Lua scripts in Python, and also send and
    > receive data between the two. Something like lunatic-python [1] would
    > be ideal. However, so far I haven't been able to build it on the
    > machines it's supposed to run on (macs with OS X Lion) and it seems to
    > be dormant.
    >
    > My requirements are stock OS X Python (which is 2.7) and Lua 5.2. I'm
    > looking for either a way to make lunatic-python work or another tool
    > that would do the job.


    The simple approach would be to run the Lua scripts with the
    subprocess module, using JSON (or something equally accessible) as an
    interchange format.

    If you need to embed the Lua interpreter in the Python process, and
    you can't get an existing third-party module to work, consider rolling
    your own C module for the purpose. My recollection of working with
    Lua is that it's a very easy language to embed.
     
    Ian Kelly, Sep 2, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnaud Delobelle

    running Lua in Python

    Arnaud Delobelle, Sep 2, 2012, in forum: Python
    Replies:
    0
    Views:
    197
    Arnaud Delobelle
    Sep 2, 2012
  2. Alec Taylor

    Re: running Lua in Python

    Alec Taylor, Sep 2, 2012, in forum: Python
    Replies:
    0
    Views:
    228
    Alec Taylor
    Sep 2, 2012
  3. Stefan Behnel

    Re: running Lua in Python

    Stefan Behnel, Sep 2, 2012, in forum: Python
    Replies:
    0
    Views:
    186
    Stefan Behnel
    Sep 2, 2012
  4. Arnaud Delobelle

    Re: running Lua in Python

    Arnaud Delobelle, Sep 2, 2012, in forum: Python
    Replies:
    0
    Views:
    187
    Arnaud Delobelle
    Sep 2, 2012
  5. Arnaud Delobelle

    Re: running Lua in Python

    Arnaud Delobelle, Sep 2, 2012, in forum: Python
    Replies:
    0
    Views:
    172
    Arnaud Delobelle
    Sep 2, 2012
Loading...

Share This Page