Interrupted system call

Peter Bell peter at bellfamily.org.uk
Mon Nov 17 04:58:44 EST 2014



On 17/11/14 16:31, Chris Angelico wrote:
> On Mon, Nov 17, 2014 at 3:10 PM, Peter Bell <peter at bellfamily.org.uk> wrote:
>> Is there a better way to interface to a serial port from Python 3?  I've
>> found a reference in the PSF 3.3.6 FAQ which points to pyserial on
>> sourceforge.
>
> ... a solution to this. I would suggest looking on PyPI, the Python
> Package Index, to see what you can get for Python 3. In your case, you
> may well be in luck:
>
> https://pypi.python.org/pypi/pyserial
>
> There's a version that claims to work with any Python version (though
> there's some minor disagreement; the metadata says 2.3-2.7 and
> 3.0-3.3, but the Windows binaries say 2.4-2.7 and 3.0-3.4). I suspect
> the "2.7" in the name is actually the version of PySerial, and it's
> coincidental that that happens also to be a Python version.

I think that you are correct.  pyserial-2.7 is supposed to be compatible 
with python3.

> Since you seem to be on a POSIX system, you shouldn't need to worry
> about the provided binary installers. Use pip3 to install it for your
> Python 3, and you should be all set.

On further investigation, it turns out that I installed pyserial from my 
distro's package manager.  The default python is 3, with python2 being 
the alternative.  Now, to go with this, I'd installed python-pyserial, 
not python2-pyserial:

==================================================
[root at automate ~]# pacman -Ss pyserial
community/python-pyserial 2.7-4 [installed]
     Multiplatform Serial Port Module for Python
community/python2-pyserial 2.7-4
     Multiplatform Serial Port Module for Python
==================================================

So, yes, my understanding is that the pyserial-2.7 which I have 
installed should be compatible with Python3.

Now I have to work out how to make the report to Chris Liechti - I'll 
try his gmx.net email address.

Thanks for all your advice - I'm enjoying my project, and loving Python!

Regards,
Peter.

-- 
-------------------------------------------------------------------
Peter Bell



More information about the Python-list mailing list