Hi
Changing 'while True' to 'while ser.readline:' doesn't print 'test', which is strange since it worked in Python 2.7. Any ideas what could be wrong? Ideally I should be able to read serial data only when it's available. Data is being sent every 1,000 ms. Python code to read the serial port. While 1: Register with the combination Ctrl + X then Y by giving a name to the file (for example readserial.py). Now, launch the program to read messages sent on the serial port from your device (for example an Arduino). Reading the messages of a Gateway MySensors on the serial port of a Raspberry Pi.
Is there any difference between the 'serial' module in Python 2.7.1 and
'pyserial 2.5' ?
I can 'import serial' without any issues....but when I follow code examples
my scripts complain:
'TypeError: readline() takes no keyword arguments'
However lots of scripts
'import serial'
and then
'ser.readline(size=None, eol=chr(13))'
..... whereas I can only
'ser.readline()'
without any keywords or arguments.
Thanks
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110325/a2606883/attachment.html>
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110325/a2606883/attachment.html>