'ioctl ' call in python (serial port reading)

Michael Hudson mwh at python.net
Wed Dec 5 06:04:21 EST 2001


Markus Schaber <use-net at schabi.de> writes:

> 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. :-)

2.1.1, please...

> >       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?)

If he was using 1.5.2 or 2.0, then the constants should be in TERMIOS
instead.

There was a release which had a crippled set of constants in termios,
but I can't remember which one it was/find it.

At any rate, all the constants mentioned are in termios on the systems
I have access to in CVS at present.

Cheers,
M.

-- 
  ... but I guess there are some things that are so gross you just have
  to forget, or it'll destroy something within you.  perl is the first
  such thing I have known.              -- Erik Naggum, comp.lang.lisp



More information about the Python-list mailing list