On Thu, Nov 10, 2016 at 12:16 PM, BartC <b...@freeuk.com> wrote:
> But now that I was about to use it, another problem. The Ubuntu Python is
> 2.7. The Windows one has both 2.7 and 3.4 (and my IDE can select either).
>
> The bit of code I wanted to run has Py3-style print functions. I tried
> 'import six' as someone suggested recently, but that didn't help as it sees
> a syntax error in the Print line before 'six' can do its thing.
>
> I suppose I can get rid of the prints for the test I wanted to do, or find
> out how to do the same thing under Py2 print. Or install Py3 on Ubuntu,
> which is a big job and I've no idea how to switch between them.
>
> Or I could just leave it all until tomorrow...

On recent Ubuntus, Python 2.7 isn't even installed by default. Use
Py3. It's there.

And if you want to use print() on Py2, learn about the __future__.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to