best way to integrate erlang and python

落爺英雄遲暮 提交于 2019-12-18 10:34:22

问题


What's the best way to integrate erlang and python?

We need to call python functions in erlang and call erlang functions in python. At this moment we are trying to use SOAP as a intermediate layer between these two languages, but we have a lot of "not compatible" troubles. Could you advise the best way to perform integration?


回答1:


As already mentioned with erlport you can use Erlang port protocol and term_to_binary/binary_to_term functions on Erlang side. On Python side there are low level port driver Port which can send and receive messages from Erlang and more high level protocol handler Protocol which simplified situation when you want to call a Python function from Erlang. Currently there are no any auxiliary interfaces on Erlang side but it's possible there will be some in the future. In the examples directory you can find some example code for different situations.

And feel free to contact me about any ErlPort related topic.




回答2:


In my experience, the best is erlport.

It allows you to build an Erlang port in Python by satisfying the Erlang port protocol. It handles the data compatibility issue by implementing the Erlang external term format. The linked page shows a clear example of how to use it.



来源:https://stackoverflow.com/questions/3990344/best-way-to-integrate-erlang-and-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!