Py-Interface
Description
The Py-Interface is a python-implementation of an
Erlang node.
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:
- 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 was last tested on Python 2.7.2+ and Erlang 17.0.
It may well still work with older version of both Python and Erlang.
Development started on Python 1.5 and Erlang R7.
- 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.
Screenshot (well, sort of)
Here's a screenshot of one of the test programs (since the
main code is a library, it doesn't look like anything at all on a
picture :-)
Download
Download the latest version:
py_interface-2.3.tar.gz.
Py-Interface is written entirely in Python,
for communication with Erlang
so you need to have Python and Erlang installed, to use it.
Development
A git repository is hosted at
github.
To clone it, run:
git clone git://github.com/tomas-abrahamsson/py_interface.git
(It was previously hosted at repo.or.gz, but I've
increasingly begun to use github instead.)
Known bugs
Probably a few.
Authors
Tomas Abrahamsson
<tab@lysator.liu.se>,
with great help from David King, Ed Blake, Luke Gorrie, Jimmy Olgeni,
Nigel Head, Paul "TBBle" Hampson, bird devdoer, David Reiss, Anton
Krasovsky and HP Wei. (I hope I haven't forgotten anyone; please let
me know if that's the case.)
Licensing
Py-Interface is distributed under the
GNU Library General Public License.
History
- version 2.3, 2018-Jan-03
py_interface-2.3.tar.gz
- Allow to specify Epmd host and port number through ErlNodeOpts.
Thanks to Dmitry Shestak
- version 2.2, 2017-Jul-11
py_interface-2.2.tar.gz
- Adapt to Erlang 20.
- version 2.1, 2017-Jan-11
py_interface-2.1.tar.gz
- Changes:
- Bugfix unpacking of strings
- Change type of binaries from ErlBinary to bytes
- New utilities erl_term.IODataToStr and erl_term.StrToList
- version 2.0, 2017-Jan-07
py_interface-2.0.tar.gz
- Python 3 support (only). Dropped support for Python 2.
(The changes to the packing and unpacking code, mostly,
were too pervasive, to support both Python 2 an 3 in the same code base.)
- version 1.4, 2017-Jan-07
py_interface-1.4.tar.gz
- NB: this is the last version with support for Python 2.
From 2.0 it is Python 3. Bugfixes might go into 1.4.x, if
important enough, but any new development is intended for
Python 3 only.
- Bugfix packing of improper lists
- In the ErlMap type (a dict), make ints and floats differ
since this is how the corresponding map is on the Erlang
side. This differ from normal Python dicts.
- Rework the homebrewn tests into Python and Erlang unit tests
- version 1.3, 2014-Apr-25
py_interface-1.3.tar.gz
- Several enhancements:
- Add support for encoding of new floats (8 bytes)
- Add support for encoding of bit strings
- Add support for exports (fun M:F/A)
- Add support for funs (fun(...) -> ... end, and fun X/A)
- Encode/decode depending on the peer's advertised distr flags
- Convert exceptions from old-style deprecated strings, to
classes
- version 1.2.1, 2014-Apr-21
py_interface-1.2.1.tar.gz
- Fix a bug in the 'dist' top-level make target
- version 1.2, 2014-Apr-21
- Add support for Erlang 17.0 maps. (note that the external term format
for maps differs in the final 17.0 from that in 17.0-rc1 and 17.0-rc2)
- version 1.1.1, 2011-Mar-15
py_interface-1.1.1.tar.gz
- Some example files that were new in 1.1 were not included in the
tar ball. They were available only via the git repository. Now
these files are in the tar ball as well:
- examples/run_remote_exec_wrapper.sh
- examples/test_remote_exec.py
- examples/run_test_erl_node_pingpong_qc.sh
- examples/test_erl_node_pingpong_qc.erl
- version 1.1, 2011-Feb-22
py_interface-1.1.tar.gz
- Changes:
- Bugfix: now handles incoming packets larger than 64kbytes
- New example examples/run_remote_exec_wrapper.sh,
which is a bit similar to what erl_call does, after
an idea by HP Wei.
- New QuickCheck test for pingpong sending of data,
see examples/test_erl_node_pingpong_qc.sh. This is
how I found the large packets bug mentioned above. Works with the
eqcmini,
which at the time of this writing is eqcmini-1.0.1.
- version 1.0, 2010-Apr-13
py_interface-1.0.tar.gz
- Changes: Applied a patch by Paul "TBBle" Hampson: Erlang/OTP
epmd R13B04 compatibility: R13B04 fixed a bug in the
epmd's handling of the `extra' field. This patch makes
py_interface work with the bug-fixed epmd.
- version 0.99, 2010-Mar-30
py_interface-0.99.tar.gz
- Changes: Bugfix of call to _HexDumpFormat in DebugHex. Reported
by Paul "TBBle" Hampson.
- version 0.98, 2009-Nov-18
py_interface-0.98.tar.gz
- Changes: Bugfix for handling negative integers, reported by bird devdoer.
- version 0.97, 2009-Jul-27
py_interface-0.97.tar.gz
- Changes:
- py_interface/erl_eventhandler.py: handles interrupted system
call exceptions also in the timeout case.
- py_interface/erl_node.py: doc string fix for methods
ErlMBox.Send and ErlNode.SendMsgFromMBox: the order of the process
name and node name had gotten mixed up. Noted by Paul TBBle
Hampson.
- py_interface/erl_node_conn.py: Python 2.6 compatibility patch by
David Reiss applied: uses md5 from hashlib
if that one is available.
- version 0.96, 2008-Dec-17
py_interface-0.96.tar.gz
- Changes: Applied two patches from Anton Krasovsky: fixes for
programming errors triggered by internode communication
failures.
Also fixed is version number propagation to all files, and
building problems: the tar file now contains all files necessary
to build the package.
- version 0.95, 2008-Jul-15
py_interface-0.95.tar.gz
- Changes: Applied patch from David King: the socket connection
now also checks for
EWOULDBLOCK
. Previously it only
checked for EAGAIN
.
- version 0.94, 2008-Jul-13
py_interface-0.94.tar.gz
- Changes: Applied patches and bugfixes from David King:
- The code now resides in its own namespace:
py_interface
- Now supports packaging as an easy_install egg
- Bugfix: Queued writes attempted to access an undefined variable.
- version 0.93, 2006-Jul-25
py_interface-0.93.tar.gz
- Changes:
- Updated to work with Erlang R10 and R11 (15-->28 bits in
pids and ports).
- Now also works with threaded Tcl (as with Debian) as
well.
- Also fixed a deprecation issue: integer vs floating-point
timeout values in
erl_event_handler.py
.
- Also added
an installation support (the
__init__.py
file),
based on information by Ed Blake.
- version 0.92, 2004-Jul-13
py_interface-0.92.tar.gz
- Several bugfixes in packing/unpacking of erlang terms. A lot of
thanks to Jimmy Olgeni and Nigel Head for patches. See the file
erl_term.py
, in the tar file, for details.
- version 0.91, 2002-Jul-21
py_interface-0.91.tar.gz
- Added autoconf stuff. This version is/was also on
the Erlang User
contribution page
- version 0.9, 2002-May-29
py_interface-0.9.tar.gz
- First version