Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80969 > unrolled thread
| Started by | Peter Bell <peter@bellfamily.org.uk> |
|---|---|
| First post | 2014-11-17 17:58 +0800 |
| Last post | 2014-11-17 17:58 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Interrupted system call Peter Bell <peter@bellfamily.org.uk> - 2014-11-17 17:58 +0800
| From | Peter Bell <peter@bellfamily.org.uk> |
|---|---|
| Date | 2014-11-17 17:58 +0800 |
| Subject | Re: Interrupted system call |
| Message-ID | <mailman.15955.1416218335.18130.python-list@python.org> |
On 17/11/14 16:31, Chris Angelico wrote:
> On Mon, Nov 17, 2014 at 3:10 PM, Peter Bell <peter@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@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
Back to top | Article view | comp.lang.python
csiph-web