Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62947

PySerial for Python 2 vs. Python 3

From Travis McGee <nobody@gmail.com>
Newsgroups comp.lang.python
Subject PySerial for Python 2 vs. Python 3
Message-ID <SKOwu.77170$VG.23751@fx12.iad> (permalink)
Organization Newshosting.com - Highest quality at a great price! www.newshosting.com
Date 2014-01-01 01:39 -0500

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

PySerial for Python 2 vs. Python 3 Travis McGee <nobody@gmail.com> - 2014-01-01 01:39 -0500
  Re: PySerial for Python 2 vs. Python 3 Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-12-31 22:43 -0800
  Re: PySerial for Python 2 vs. Python 3 Chris Angelico <rosuav@gmail.com> - 2014-01-01 17:48 +1100
  Re: PySerial for Python 2 vs. Python 3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-01 17:57 +1100
  Re: PySerial for Python 2 vs. Python 3 Terry Reedy <tjreedy@udel.edu> - 2014-01-01 14:54 -0500

csiph-web