Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'subject:Python': 0.06; 'none:': 0.07; 'subject:ANN': 0.07; 'subject:released': 0.07; '%s"': 0.09; '(currently': 0.09; 'atom': 0.09; 'instances.': 0.09; 'rewrite': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'changes': 0.15; '"hello': 0.16; '"ok":': 0.16; '[])': 0.16; 'file).': 0.16; 'middleware': 0.16; 'subject:library': 0.16; 'to:addr:python-announce-list': 0.16; 'library': 0.18; 'all,': 0.19; 'basically': 0.19; 'subject:] ': 0.20; 'example': 0.22; 'programming': 0.22; 'import': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'header :User-Agent:1': 0.23; 'simpler': 0.24; 'versions': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'this:': 0.26; 'supported': 0.26; 'function': 0.29; 'subject:) ': 0.29; 'allows': 0.31; 'languages': 0.32; 'are:': 0.33; 'subject: (': 0.35; 'skip:- 50': 0.35; 'tool': 0.35; 'version': 0.36; 'url:org': 0.36; 'application': 0.37; 'recent': 0.39; 'subject:[': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; 'even': 0.60; 'helps': 0.61; 'new': 0.61; 'details.': 0.61; 'complete': 0.62; 'more': 0.64; 'apart': 0.72; 'erlang': 0.91 Date: Tue, 11 Jun 2013 15:10:59 +0200 From: Dmitry Vasilev User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-announce-list@python.org Subject: [ANN] ErlPort (library to connect Erlang to Python) 1.0.0alpha released Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 14 Jun 2013 09:38:56 +0200 Cc: python-list@python.org X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Approved: python-announce-list@python.org Newsgroups: comp.lang.python.announce Message-ID: Lines: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371195537 news.xs4all.nl 15997 [2001:888:2000:d::a6]:36309 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python.announce:977 Hi all, I've just released ErlPort version 1.0.0alpha. ErlPort is a library for Erlang which helps connect Erlang to a number of other programming languages (currently supported Python and Ruby). Apart from using ErlPort as a tool to call Python/Ruby functions from Erlang it also can be used as a middleware for Python/Ruby instances. Check http://erlport.org for more details. The new version of ErlPort is basically a complete redesign and rewrite of the project. The main changes in this version are: - Redesigned as Erlang application - Added support for all recent (2.5 and higher) versions of Python - Added support for all recent (1.8.6 and higher) versions of Ruby - Added support for custom data types Why ErlPort can be interesting for Python developers? ----------------------------------------------------- Apart from calling Python functions from Erlang or Erlang function from Python, ErlPort also allows to use Erlang as a middleware for Python. The following is a small inter-process recursion example (place it in roll.py file). Actually this example will be even simpler with ErlPort 1.0.0. from os import getpid from erlport.erlterms import Atom from erlport.erlang import call, self def roll(n, procs=None): if procs is None: procs = [] procs.append(self()) print "Hello from %s" % getpid() if n > 1: status, pid = call(Atom("python"), Atom("start"), []) if status == "ok": procs = call(Atom("python"), Atom("call"), [pid, Atom("roll"), Atom("roll"), [n - 1, procs]]) return procs And it can be used with Erlang shell and ErlPort like this: 1> {ok, P} = python:start(). {ok,<0.34.0>} 2> python:call(P, roll, roll, [5]). Hello from 7747 Hello from 7749 Hello from 7751 Hello from 7753 Hello from 7755 [<0.34.0>,<0.37.0>,<0.40.0>,<0.43.0>,<0.46.0>] -- Dmitry Vasiliev http://hlabs.org http://twitter.com/hdima