tomas-abrahamsson / py_interface Goto Github PK
View Code? Open in Web Editor NEWAn Erlang to Python integration: a Python program can appear as an Erlang node
License: Other
An Erlang to Python integration: a Python program can appear as an Erlang node
License: Other
Hello,
Does it support asyncio?
Steps to reproduce:
pip3 install py_interface
Crash trying to run example:
--- py_interface/test ‹master› » ./pingpong_slave.py -d -n [email protected] -c x
Traceback (most recent call last):
File "./pingpong_slave.py", line 23, in <module>
from py_interface import erl_term
File "/usr/local/lib/python3.6/site-packages/py_interface/__init__.py", line 16, in <module>
__import__('py_interface',globals(),locals(),__all__,-1)
ValueError: level must be >= 0
--- py_interface/test ‹master› »
quick fixed it, by changing : /usr/local/lib/python3.6/site-packages/py_interface/init.py
--- __import__('py_interface',globals(),locals(),__all__,-1)
+++ __import__('py_interface',globals(),locals(),__all__)
Is this a known issue?
Hi,
I'm trying to generate the equivalent of the following Erlang data structure, convert to bytes and feed into the sha1 function.
erlang:term_to_binary({{<<"fodddo">>,<<"foo">>},<<"bar">>} ).
While attempting to construct it in Python I got to this point and could get no further.
In [45]: erl_term.ErlTuple( ( erl_term.ErlBinary("foo" ) ))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-45-58ffc74dc16e> in <module>()
----> 1 erl_term.ErlTuple( ( erl_term.ErlBinary("foo" ) ))
/usr/local/lib/python2.7/site-packages/py_interface/erl_term.pyc in ErlTuple(elementsAsList)
157 def ErlTuple(elementsAsList):
158 """An Erlang tuple. This maps to a python tuple."""
--> 159 return tuple(elementsAsList)
160
161 def ErlList(elements):
TypeError: iteration over non-sequence
Is this coding error, or a bug ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.