'ioctl ' call in python (serial port reading)

Markus Schaber use-net at schabi.de
Wed Dec 5 05:15:42 EST 2001


Hi,

On Tue, 04 Dec 2001 13:07:31 +0200
mixo <mixo at beth.uniforum.org.za> wrote:

> P.S I had to change
>      "i &=~ termios.TIOCM_RTS"  to "i = (i) & ~TIOCM_RTS"

It seems that you're using python 1.5.2. Maybe 2.1 is worth an upgrade. :-)

>       For one reason or another I don't "TIOxxxx" defined
>       in "termios" module,so I also had to define them
> 
> #from /usr/include/asm/termios.h
> TIOCMGET =0x5415
> TIOCMSET =0x5418
> TIOCM_RTS =0x004

Maybe you should contact the termios author about this, so this might be corrected in future versions? (or a new module with the termios.h constants added?)

markus

-- 
"GPL software is not free - the cost is cooperation"



More information about the Python-list mailing list