Re: [zeromq-dev] zproto python support?

2015-05-10 Thread Arnaud Loonstra
I've created a generator for Python. It still misses some functionality as I don't have an approach for the Zframe and Zmsg types. However one thing I didn't find out how to do with gsl is the following: In Python there's no switch construct. So instead you're supposed to use if, elif, else.

Re: [zeromq-dev] zproto python support?

2015-05-08 Thread Arnaud Loonstra
Thanks, playing with it now, never knew it was that easy :) On 2015-04-23 13:52, Pieter Hintjens wrote: Start with the zproto_codec layer, take any of the existing generators, and copy/rename with a _py in the filename. Build/install imatix/gsl. Take zproto_example.xml and generate using:

Re: [zeromq-dev] zproto python support?

2015-04-25 Thread Michel Pelletier
Awesome Joe I did not know that, thanks! On Thu, Apr 23, 2015 at 7:34 PM, Joe McIlvain joe.eli@gmail.com wrote: Michel, Much of the work for what you're talking about is already done by others in zproject (see https://github.com/zeromq/zproject/blob/master/zproject_bindings_python.gsl).

Re: [zeromq-dev] zproto python support?

2015-04-23 Thread Michel Pelletier
Generating pyzmq is one approach, another to consider is generating a python C wrapper around the zproto C generation with ctypes or cffi. That way it just becomes a thin layer on top of an already proven one. I've briefly looked at the latter but haven't had time to spike the idea out any

[zeromq-dev] zproto python support?

2015-04-23 Thread Arnaud Loonstra
Hi all, I'm currently working on porting zgossip to Python but running into wrapping my head around zproto which is used to generate the code. Has there been any attempt for generating python code using zproto? I see there's go, php and csharp support? Any pointers to what it would mean to

Re: [zeromq-dev] zproto python support?

2015-04-23 Thread Pieter Hintjens
Start with the zproto_codec layer, take any of the existing generators, and copy/rename with a _py in the filename. Build/install imatix/gsl. Take zproto_example.xml and generate using: gsl -script:zproto_codec_py zproto_example On Thu, Apr 23, 2015 at 1:08 PM, Arnaud Loonstra

Re: [zeromq-dev] zproto python support?

2015-04-23 Thread Joe McIlvain
Michel, Much of the work for what you're talking about is already done by others in zproject (see https://github.com/zeromq/zproject/blob/master/zproject_bindings_python.gsl). The zproject code generators do two major things: 1) generate the build systems and project skeleton for a C library. 2)