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


Groups > comp.lang.python > #79215 > unrolled thread

Re: what is the easiest way to install multiple Python versions?

Started byChris Angelico <rosuav@gmail.com>
First post2014-10-17 01:59 +1100
Last post2014-10-17 01:59 +1100
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.


Contents

  Re: what is the easiest way to install multiple Python versions? Chris Angelico <rosuav@gmail.com> - 2014-10-17 01:59 +1100

#79215 — Re: what is the easiest way to install multiple Python versions?

FromChris Angelico <rosuav@gmail.com>
Date2014-10-17 01:59 +1100
SubjectRe: what is the easiest way to install multiple Python versions?
Message-ID<mailman.14925.1413471581.18130.python-list@python.org>
On Thu, Oct 16, 2014 at 11:31 PM, Albert-Jan Roskam <fomcl@yahoo.com> wrote:
> Most things were indeed easy to solve. But this one surprised me. With Python 2.6, I need to outcomment the 'lambda' line. The error is what I get in Python 2.6. It does not matter if I do u"\n".join(het_logboek[i:]). I don't use latin-1 anywhere in my program. I need to convert unicode to bytes in Python 2.6, or else it chokes in the smart quote.
>

Hmm, that looks like a configuration difference between the two,
rather than a major breaking difference. It'll depend on the console
settings; if you're running 2.6 from cron, but 2.7 from the console
(or the other way around), you'll see stuff like this break.

It's also possible that a bug was discovered, of course, but what
exactly the bug is, I can't say. The error you're seeing is perfectly
correct: you have Unicode character U+2018 (a curly quote) in your
stream, and the print statement is trying to send that to a Latin-1
output, and that's not going to work. The question is, why is your
console believed to be set to Latin-1? And if encoding UTF-8 works,
then there's something very VERY wrong. (Unless by "works" you just
mean "doesn't throw an error", and the UTF-8 bytes are being
interpreted as Latin-1 bytes.)

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web