Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79215
| References | <CAPTjJmoJhE3UH2bwAUj1uqSxqHBbs6NONojcz-L_gS8fzSD6vQ@mail.gmail.com> <219536496.81828.1413462689661.JavaMail.yahoo@jws10745.mail.gq1.yahoo.com> |
|---|---|
| Date | 2014-10-17 01:59 +1100 |
| Subject | Re: what is the easiest way to install multiple Python versions? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14925.1413471581.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: what is the easiest way to install multiple Python versions? Chris Angelico <rosuav@gmail.com> - 2014-10-17 01:59 +1100
csiph-web