[Twisted-Python] Using SerialPort with t.a.s.Application
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Fri Feb 4 11:32:41 MST 2011
On 08:20 am, albert.brandl at weiermayer.com wrote:
>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.
IStreamServerEndpointStringParser is the hook. I don't know of any
documentation on its use, though. Perhaps
twisted/internet/test/fakeendpoint.py will give you an idea of what to
do, though (then, feel like writing the missing docs?).
Jean-Paul
More information about the Twisted-Python
mailing list