[Pythonmac-SIG] How to print unicode to OS-X Terminal.app

Christopher Barker Chris.Barker at noaa.gov
Fri Feb 15 00:11:57 CET 2008


Robin Dunn wrote:
> Just replace sys.stdout with an object with a write() method that does 
> what you want.

I don't think that will do it, as "print" will have already converted 
the object to a string, and it does that with str(), which calls 
object.__str__, which used the default encoding....

oh well, I'm really just whining, but this transition to unicode is 
pretty painful!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list