RTS/CTS and DTR/DTS control

Peter Hansen peter at engcorp.com
Fri Jul 4 19:36:45 EDT 2003


Mike wrote:
> > Is there a library in Python that will give me control over the
> > handshaking lines directly?
> I am running Linux, Python 2.2.2. It would be nice (not mandatory)
> to be cross platform though.

You call them handshaking lines, so one might infer you want
to use them as such while doing serial communications.  Are
you in fact actually planning to control them as discrete
inputs and outputs, for some kind of control application?
(If not, I'm curious why you want to control them directly.)

There is Chris Liechti's library, which you can find with
http://www.google.com/search?q=python+serial+port but I'm
not sure it supports direct control of the I/Os...  if it
doesn't you should be able to get direct control of those 
lines under Linux using appropriate fcntl.ioctl() calls, I 
would think, though I haven't done it myself.

-Peter




More information about the Python-list mailing list