Senthil Kumaran wrote: > On Tue, Jun 23, 2009 at 03:50:42AM -0500, Jeff Rush wrote: >>> just pass the & of the another structure in the structure element, some > > Jeff: you seem to have got what he was trying to do with message > sending. Is this some standard way over serial port, as you went > upto the mention or flatteners.
Flattening is not specific to message sending, just data structures in general. Over the years I have developed several protocol applications, some serial I/O, some network packets and I recognized what he trying to do. The principles of layering your message fragments so you deal with one abstraction at a time is common. It is also a fascinating area in which to use Python's introspection and metadata capabilities to greatly simplify something that is rather complicated when written in a procedural language like C. See my next email for an example. > But, exposing the learner to twisted and flatteners would be bit too > much of a high dose IMHO. You're probably right but I thought the docs for STAN were well-written and would be useful reading at least. STAN itself is actually a small part of Twisted, about 25 KB of source. I just happened to be reading the source earlier this week as I was trying to use it as an alternative template language with the Grok web framework. It won't just drop into Grok because of Twisted's way of using zope.interface and their own adapter registry. Therefore I'm working to split STAN out as a separate egg usable with Grok. I wish the Twisted folk would cooperate better with the setuptools world. -Jeff _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers