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


Groups > comp.lang.python > #97442

Re: Python 2 ‘print’, coercing arguments to Unicode

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'cc:addr:python-list': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'stringio': 0.09; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'doc,': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:Unicode': 0.16; 'laura': 0.18; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'done': 0.35; 'but': 0.36; 'url:org': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'your': 0.60; 'header:Message-Id:1': 0.61; 'practice.': 0.66; 'subjectcharset:utf-8': 0.71; 'header:In-reply-to:1': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=openend.se; s=default; t=1444135378; bh=xk/qsb18EqPu8FJh9TdCqZEPUa8UnPJMO7aztel01I4=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=WjASs/cnR/BGeszFg2r6J5rvHXL+FHwoZki8mVE9mpcmWFF7QvbtLuKlZShW6TOy+ eEmqumuGKeKViAZ+4eYH7R79+d1fjPK/R0WGH2Fo28HQ8ckiVQzJc4uuuMRzNKIfe2 IMLZglk07fpA6xExf6GfWBM5C32lSX6dp+Jq/NVg=
To Ben Finney <ben+python@benfinney.id.au>
cc python-list@python.org, lac@openend.se
From Laura Creighton <lac@openend.se>
Subject Re: Python 2 ‘print’, coercing arguments to Unicode
In-reply-to <85wpv0z368.fsf@benfinney.id.au>
References <851td81g08.fsf@benfinney.id.au> <85wpv0z368.fsf@benfinney.id.au>
Comments In-reply-to Ben Finney <ben+python@benfinney.id.au> message dated "Tue, 06 Oct 2015 21:45:03 +1100."
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-ID <11322.1444135367.1@fido>
Date Tue, 06 Oct 2015 14:42:47 +0200
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Tue, 06 Oct 2015 14:42:58 +0200 (CEST)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.422.1444135397.28679.python-list@python.org> (permalink)
Lines 7
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1444135397 news.xs4all.nl 23733 [2001:888:2000:d::a6]:33103
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3239
X-Received-Body-CRC 335120916
Xref csiph.com comp.lang.python:97442

Show key headers only | View raw


I think the thing you want to converse is your stringIO not your print.
I think you do this using six.stringIO
https://pythonhosted.org/six/

But I have only read the doc, not done this in practice.

Laura

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python 2 ‘print’, coercing arguments to Unicode Laura Creighton <lac@openend.se> - 2015-10-06 14:42 +0200

csiph-web