serial port communication

Hugo hugues103 at voila.fr
Tue Mar 12 15:53:27 EST 2002


Hi,

I try to have a communication between two computers using the serial
ports.

In the interpretor, I just try these instructions :
>>> from os import *
>>> fd = open ('/dev/ttyS0', O_RDWR)
>>> write (fd, "a")
1
>>> read (fd, 1)
and everything stop : the read() instruction is probably waiting for
something (I send a character from the other computer but it doesn't
work) ? a stop byte ? or I have use a "timeout" thing ? or the termios
module ? I don't know !

Thank you for any help.



More information about the Python-list mailing list