Reputation: 1836
How do I write to the serial port in Vista from Python? The termios package only seem to support posix.
Upvotes: 5
Views: 2723
Reputation: 1836
Seems like it wasn't any harder than this using pyserial:
import serial
ser = serial.Serial(0) # open first serial port with 9600,8,N,1
print ser.portstr # check which port was really used
ser.write('hello')
ser.close()
Upvotes: 7
Reputation: 7512
pyserial does the trick, you'll need python extensions for windows for it to work in windows.
Upvotes: 9