[IronPython] serial ports

jeff sacksteder jsacksteder at gmail.com
Sat Jun 24 13:31:42 PDT 2006


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060624/8bbdf56b/attachment.html


More information about the users mailing list