Unicode blues in Python3

Stefan Behnel stefan_ml at behnel.de
Tue Mar 23 15:57:32 EDT 2010


nn, 23.03.2010 19:46:
> Actually what I want is to write a particular byte to standard output,
> and I want this to work regardless of where that output gets sent to.
> I am aware that I could do
> open('nnout','w',encoding='latin1').write(mychar) but I am porting a
> python2 program and don't want to rewrite everything that uses that
> script.

Are you writing text or binary data to stdout?

Stefan




More information about the Python-list mailing list