Skip to content

skysbird/py_interface

Repository files navigation

README for the py_interface
---------------------------
$Id$


What is py_interface
--------------------

The py_interface is a python-implementation of an Erlang node. For
information on the Erlang programming language, visit the web site
http:https://www.erlang.org/.

The py_interface provides the possibility to create a node that may be
used for communication with other Erlang nodes.

Some characteristics:
* The Python nodes are hidden, like the Java nodes
* The Python node supports
  - registering the Python node in the epmd
  - sending and receiving message
  - executing remote procedure calls (the rpc:call(M,F,A) mechanism)
* The Python node does currently _not_ do:
  - linking
  - tracing
* The Python node translates Erlang types to Python types as far as
  there is a reasonable Python counterpart. If there is not, then
  a class is used.
* The Python node is a single threaded callback-driven process.
* The Python node is released under LGPL, see the file COPYING.LIB.
* The Python node runs on Python 1.5 -- Python 2.3. It
  can talk to Erlang R7 -- R9 nodes, as far as I know.
* The source of information for this Python node has been the files
  `distribution_handshake.txt' and `erl_ext_dist.txt' together with
  the Java node source files, the `net_kernel.erl' and the
  `dist_util.erl' files in the Erlang source code distribution.


General programming model
-------------------------

When using the py_interface, the general principle is to register a
callback for different purposes, such as incoming messages to the pid,
an return from an rpc-call, or a timeout. The callback will get called
whenever the message or return value arrives or when the timer times
out.

The easiest way to get acquainted with the Python node, check out the
test programs:

* run_test_erl_node_pingping.sh
  This tests communication, packing and unpacking of terms,
  and show how to start the nodes.

* test_erl_node_tk_1.py
  This brings up a window in which you can select
  to send a message or to make an rpc-call.

* test_erl_node.py
  This starts a Python node and registers a process called p.
  You can then start an Erlang node and send messages to this
  process.

* test_erl_node_conn.py
  This tests lowlevel inter-node communication.


Contacting the author
---------------------
To contact the author, Tomas Abrahamsson: send a mail to:
[email protected]

About

erlang interface for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published