'ioctl ' call in python (serial port reading)

mixo mixo at beth.uniforum.org.za
Tue Dec 4 03:57:23 EST 2001


I am current trying to drop 'RTS' (Request To Send)
on a serial port. In 'c' I do the following :

++++++++++++++++++++++++++++++++++++++++++++++++
.
.

int fd, mdlns;//fd is a  file discriptor
.
.

ioctl (fd, TIOCMGET, &mdlns);
mdlns &= ~TIOCM_RTS;
ioctl (fd, TIOCMSET, &mdlns);
.
.
.
+++++++++++++++++++++++++++++++++++++++++++++++

What would the equivilent code in 'python' be?
How can I disable 'RTS' on a serial port?




More information about the Python-list mailing list