PySerial for Python 2 vs. Python 3

Travis McGee nobody at gmail.com
Wed Jan 1 01:39:44 EST 2014


I've been working with a simple serial device that attaches to a USB 
port. It takes as commands short strings.

I wanted to use PySerial under Python 3, and, of course had the Devil's 
own time getting it installed and working since everything is geared 
towards Python 2.

Anyway, I finally got it installed, but when I try to use a statement of 
the sort ser.write("string") I get an exception which seems to imply 
that the argument needs to be an integer, rather than a string.

With some minor adjustments it works just fine under Python 2, so, in a 
sense, this is a non-issue. However, I'd be interested to hear from 
anyone who can comment on what the problem is.

Thanks,

Travis



More information about the Python-list mailing list