Comunicating through COM ports

Willy Heineman wheineman at uconect.net
Sat Dec 22 12:03:45 EST 2001


"Alves, Carlos Alberto - Coelce" <calves at coelce.com.br> wrote in message news:<mailman.1008852145.28654.python-list at python.org>...
> Anybody could give me an example code of how connect/comunicate through COM
> ports (i.e. COM1, COM2). I'm under windows 98.
> Thanks!!!
> 
> Carlos Alberto
> COELCE/DPRON-Departamento de Projetos e Obras Norte
> Fone: 677- 2228
> e-mail: calves at coelce.com.br
> \|||/
> (o o)
> --ooo0-( )-0ooo--
> 
> 
> 
> --
Mark Hammond has done a spectacular job of encapsulating the Win32 api
functions for using the COM ports under Windows in Win32all. You'll
need the documentation from Microsoft which you can get at
msdn.microsoft.com. Try searching for things like BuildDCB and
ReadFile. The API documentation and examples should be sufficient to
use Mark's equivalents. Alternatively, you can get a swigged module of
all of the Win32 API calls I made a while back,
http://www.uconect.net/~wheineman/python/win32comm.zip . A binary for
Python 2.0 is included as well as the source which only requires
Visual C++. Hope this is useful.



More information about the Python-list mailing list