Skip to content

Call python function from lua #68

@Martmists-GH

Description

@Martmists-GH

Is there a way to call a python function from Lua? I've tried the following:

-- main.lua
py = require "python"
my_lib = py.import "my_lib"
print(my_lib.test)  -- nil, so I can't call it.
# my_lib.py
def test():
    return 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions