RS232 module

Grant Edwards grante at visi.com
Wed Apr 25 14:35:35 EDT 2001


In article <3AE70E63.63F5CBC5 at aon.at>, Oliver Vecernik wrote:

>> I'd like to write some SW communicating via RS232. I'm used to
>> do it on Windows via MSCOMM32. But the new app should run under
>> Linux as well. My question is how this is done. Is there a
>> portable way to communicate via serial ports? Are there any
>> samples available?
>
>Obviously there is no portable solution, because I didn't
>receive any feedback. Meanwhile I was playing with MSCOMM and
>everthing worked as expected under Windows, but how for example
>is the port configured (baudrate, handshake, ...) under Linux.
>I can't believe that there is no robust module for that! Can
>anyone give me a hint?

Under Unix (in general), you can use the termios package.  This
is ugly, but it works and is moderately portable between Posix
systems.  If you want a nicer wrapper around the termios stuff,
there are two PosixSerial packages.  The one I wrote and has
undergone minimal testing and has no documentation:

            ftp://ftp.visi.com/users/grante/python

I've seen references to another module named PosixSerial. But,
the last time I saw it mentioned nobody had a valid location
for it.

-- 
Grant Edwards                   grante             Yow!  FROZEN ENTREES may
                                  at               be flung by members of
                               visi.com            opposing SWANSON SECTS...



More information about the Python-list mailing list