[Twisted-Python] Using SerialPort with t.a.s.Application

Albert Brandl albert.brandl at weiermayer.com
Fri Feb 4 03:20:28 EST 2011


On Thu, Feb 03, 2011 at 07:00:39PM -0000, exarkun at twistedmatrix.com wrote:

> That probably makes sense, but first, does the endpoints string 
> description plugin API help?  You can provide 
> IStreamServerEndpointStringParser (defined in 
> twisted.internet.interfaces) plugins to extend the parser for those 
> strings.

Actually, that's the way I implemented this. But I didn't find any
hooks for extending the parser, so I manually inserted new items
into endpoints._endpointServerFactories and endpoints._serverParsers
and added the StringParser to endpoints. 

Is there a better way? Could you provide me with a link to any 
documentation? I've already read the tutorial about creating plugins.

> There are some tickets filed already for adding some other kinds of 
> endpoints (eg an IPv6 endpoint - 
> http://twistedmatrix.com/trac/ticket/4470), but it doesn't look like 
> there's one for serial port, so yea - it would be great if you could 
> file that one.

Fine. Any suggestions for the name of the new endpoint?

Best regards,

Albert
-- 
Albert Brandl
Weiermayer Solutions GmbH      | Abteistraße 12, A-4813 Altmünster
phone: +43 (0) 720 70 30 14    | fax: +43 (0) 7612 20 3 56
web: http://www.weiermayer.com



More information about the Twisted-Python mailing list