aaiyer / rfoo Goto Github PK
View Code? Open in Web Editor NEWrfoo - Fast Python RPC client/server module.
Home Page: https://github.com/aaiyer/rfoo
rfoo - Fast Python RPC client/server module.
Home Page: https://github.com/aaiyer/rfoo
I create 2 files, rfoo_server.py:
import rfoo
class MyHandler(rfoo.BaseHandler):
def echo(self, str):
return str
rfoo.UnixServer(MyHandler).start('sock')
and rfoo_client.py:
import rfoo
from rfoo import Proxy
c = rfoo.UnixConnection().connect('sock')
print(Proxy(c).echo('hello'))
Then I start them one after another and expect the client to print hello. Instead I get IOError in server, and EOFError on client (due to no response from server obviously).
I found out exact reason of this error (sorry for not making a pull request):
lines 251:252 of _rfoo.py
if buffer[0] != INTEGER:
raise IOError()
when I comment them out, everything works OK, and I can't get what they are there for.
when run sudo python setup.py install, here is the output:
running install
running build
running build_py
running build_ext
building 'rfoo.marsh' extension
error: unknown file type '.pyx' (from 'rfoo/marsh.pyx')
however, commit 1308b4a is fine.
rconsole doesn't store history.
It would be really nice if rconsole would store the history in order to just use the up-arrow key to replay recent commands after a restart.
Hi,
Now that rfoo works out of the box on Python3, it would be nice to have the debian package upgraded to. Unless it will be removed from debian in a near future.
I made a first attempt of packaging here:
https://salsa.debian.org/kieffer-guest/rfoo
but it fails as the release is not tagged in github. So could you please create a tag called 1.3.1 to allow the packaging ?
Thanks in advance.
Jérôme
PS: The debian developper is in copy @picca
cd
to it.python setup.py install
:running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/rfoo
copying rfoo/__init__.py -> build/lib.linux-x86_64-3.7/rfoo
copying rfoo/_rfoo.py -> build/lib.linux-x86_64-3.7/rfoo
creating build/lib.linux-x86_64-3.7/rfoo/utils
copying rfoo/utils/__init__.py -> build/lib.linux-x86_64-3.7/rfoo/utils
copying rfoo/utils/rconsole.py -> build/lib.linux-x86_64-3.7/rfoo/utils
running build_ext
cythoning rfoo/marsh.pyx to rfoo/marsh.c
/home/sohang.chopra/.local/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/sohang.chopra/rfoo/rfoo/marsh.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'rfoo.marsh' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/rfoo
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m -c rfoo/marsh.c -o build/temp.linux-x86_64-3.7/rfoo/marsh.o
rfoo/marsh.c:6:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
Note: README.md
said to do sudo python setup.py install
but I did this without sudo
as I don't have sudo
access to the system.
$ python --version
Python 3.7.10
$ cython --version
Cython version 0.29.33
$ uname -r
4.14.246-187.474.amzn2.x86_64
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.