Is it possible to call a function from a separate Python script even if the whole project is in Lua?
Is it possible to call a function from a separate Python script even if the whole project is in Lua?
I use Lua in my project. But there is a task I need to be done, which I cannot find a way to code it Lua so I coded it with Python. Is it possible to call a function from a separate Python script using Lua?
Re: Is it possible to call a function from a separate Python script even if the whole project is in Lua?
Hello,
normally the approach you would take is to write a plugin that offers the missing functionality, via a new script command, e.g.
If you have an external application (i.e. not running in CoppeliaSim), then you have several ways to handle this via a means of communication.
E.g. using the ZeroMQ functionality (in the linked example, you would have the requester in a CoppeliaSim script, and the responder running in Python and handling requests from CoppeliaSim.
Cheers
normally the approach you would take is to write a plugin that offers the missing functionality, via a new script command, e.g.
Code: Select all
local outArg1,outArg2,...=simMyPlugin.doSomeTask(inArg1,inArg2,...)
E.g. using the ZeroMQ functionality (in the linked example, you would have the requester in a CoppeliaSim script, and the responder running in Python and handling requests from CoppeliaSim.
Cheers