Threading and serial port access
willie at macleod-group.com
willie at macleod-group.com
Sat Jun 18 17:53:03 EDT 2005
Diez wrote:
> Apart from that the approach you use is wasting resources - if you are
> concerned about that (or better style...) use e.g. twisted with the
> serial and parallel support and its so-called select reactor. The idea
> behind that concept is that the OS is responsible for scannig IO-Ports.
> It notifies an application about newly arrived data by the system
> function select - which means that your program sits and waits not
> cosuming any resources until actual data arrives. See the module select
> for an overview, and google for "python twisted serial".
Thanks for the help, the code you previously posted worked, but I can
see it could get very messy if the number of ports increased...
I'm going to look at twisted python. Thanks again for the pointers,
much appreciated.
Regards
William MacLeod
More information about the Python-list
mailing list