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: 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 cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Python 2 =?utf-8?B?4oCYcHJpbnTigJks?= 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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