Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65928

Re: Using asyncio for serial port

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Using asyncio for serial port
Date 2014-02-11 18:42 +0200
Organization A noiseless patient Spider
Message-ID <87d2itd2ii.fsf@elektro.pacujo.net> (permalink)
References <be970b74-f6a8-4d75-81d0-078c4ff681c7@googlegroups.com>

Show all headers | View raw


james.time4tea@gmail.com:

> I'm looking at using asyncio for creating an socket <-> serial
> protocol bridge, but looking at the current implementation of asyncio
> it looks to be quite socket specific.
>
> I can't see any way to get it to support a simple serial device.

Never tried it, but if you can open the serial device and get its file
descriptor, you should be able to use

  http://docs.python.org/3.4/library/asyncio-eventloop.html#watch-file-descriptors

BTW, the specification doesn't indicate if the reader/writer callbacks
are level-triggered or edge-triggered. I'm afraid they are
level-triggered.

At any rate, asyncio looks like a real positive development in
Pythonland.


Marko

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Using asyncio for serial port james.time4tea@gmail.com - 2014-02-08 15:42 -0800
  Re: Using asyncio for serial port Phil Connell <pconnell@gmail.com> - 2014-02-11 08:12 +0000
  Re: Using asyncio for serial port Marko Rauhamaa <marko@pacujo.net> - 2014-02-11 18:42 +0200

csiph-web