[Y-devel] And now for something completely different

Mark Thomas mark at www.y-windows.org
Mon Feb 23 01:34:20 GMT 2004


On Sun, 22 Feb 2004, Jerome Laheurte wrote:

> There are two parts:
>
> * The low-level binding implements basic message operations
> (invoke/find class/etc...); it's written in C and made available to
> Python through the modY module. Very basic, indeed. Uses libY. It
> could be seen as an implementation of the Y protocol in C, but rather
> Python-biased.

That's almost the right way to do it.  libY has vanished (it was a bad
idea in the first place), so you should copy all the relevant code into
modY.

> * The high-level binding reads class descriptions from an XML file and
> creates Python classes in the module namespace, taking care of
> necessary translations, creating method/property objects as attributes
> of the newly generated classes so that everything happens
> transparently. Python introspection capabilities came in handy here.
>
> The 0.1 version is rather rough, with code that could appear as Black
> Magic :) but I began to include comments in 0.2...
>
> The fact is, I'm quite lazy. Relying on libYc++ for a binding, let's
> say through SWIG, would have been quite difficult, compared with this
> rather simple scheme. Right now, every time someone adds a widget to
> the Y core, I just have to write a few lines of XML to support it, and
> get back to reading /. or some other time-loosing site.

Perfect.  That is How It Should Be.

Regards,

  Mark.
-- 
|| Mark Thomas
|| efaref.net
||
|| I'll live forever. Or die trying.



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved