how to cut and paste in the windows of python(command line)

Jeroen Ruigrok van der Werven asmodai at
Thu Jul 24 13:59:53 CEST 2008

-On [20080724 13:50], Fredrik Lundh (fredrik at wrote:
>if you want better console support, consider installing the "ipython"

Unless you work with non-ASCII. Ipython mangles non-ASCII unfortunately.

[Full UTF-8 environment]

In [1]: a = u'愛'
In [2]: a
Out[2]: u'\xe6\x84\x9b'

Normal python shell:

>>> a = u'愛'
>>> a

I wonder if it can be easily fixed with a getpreferredencoding() or by using
an .encode(sys.stdout.encoding or getpreferredencoding() or 'ascii',
'replace') triplet.

Jeroen Ruigrok van der Werven <asmodai(-at-)> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン | | GPG: 2EAC625B
One who knows that enough is enough will always have enough...

More information about the Python-list mailing list