I'm having trouble reading data from a serial port.

I'm connected with a null modem to another pc- I can send text fine with the Write() method, so I know the cable and bits are all correct. I'm trying something like

from System.IO.Ports import SerialPort
s = SerialPort(PortName='COM1',BaudRate=9600)
s.Open()
while 1:
    print s.ReadLine()

I would expect this to produce a line of text each time the 'return' key was pressed on remote terminal, yet nothing ever happens. The VB examples I have looked at seem to use the ReadLine() method in this way. What's the problem?



_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to