Currently the package is in development and can be installed by:
pip install .Please check try_pyepmd.py for a quick usage detail. The script starts a epmd server written in this package and listens at the given port.
from epmd import Epmd
# use a custom EPMD port to not interfere with a regular EPMD possibly running
server = Epmd(port=4370)
asyncio.run(server.start_server())Now, use your erlang module with the custom epmd started (running at port 4370) above by:
ERL_EPMD_PORT=<custom_epmd_port> erl -name <node_name>Example:
-
Starting node
a@127.0.0.1:ERL_EPMD_PORT=4370 erl -name a@127.0.0.1
-
Starting node
b@127.0.0.1:ERL_EPMD_PORT=4370 erl -name b@127.0.0.1
-
Connect nodes
a@127.0.0.1andb@127.0.0.1:(a@127.0.0.1)1> net_kernel:connect_node('b@127.0.0.1').
or, ping by:
(a@127.0.0.1)1> net_adm:ping('b@127.0.0.1').
Thanks to Amit Garu (amitgaru2@gmail.com) for contributing the initial version of Epmd.