print u"\u0432": why is this so hard? UnciodeEncodeError

Skip Montanaro skip at pobox.com
Mon Apr 12 22:46:23 EDT 2004


    David> Now I'm curious -- how do you even find out it's a Terminal
    David> window you're looking at, rather than say an xterm?

I just compared the output of "env" in both xterm and Terminal windows and
came up with these clues:

    * TERM in an xterm is "xterm".  In Terminal it's "vt100".

    * In Terminal a TERM_PROGRAM environment variable is defined with a
      value of "Apple_Terminal".

    * The xterm also defines DISPLAY for obvious reasons.

Skip




More information about the Python-list mailing list