This python module provides access to the serial port, with backends for standard Python running on Windows, Linux, BSD (possibly any POSIX compilant system), Jython and IronPython. The module named "serial" automatically selects the appropriate backend.
>>> ser = serial.Serial('/dev/tty0', 19200, timeout=1) >>> s = ser.read(10) # read up to ten bytes (timeout) >>> ser.write("hello") # write a string >>> line = ser.readline() # read a '\n' terminated line >>> ser.close() Tested on i386, macppc. Please test and comment. Cheers, Daniel
py-serial.tgz
Description: application/compressed-tar