Message88674
This is not a bug in distutils, but how print works when executed
through subprocess.
here's a demo:
Create a file called "test.py" with:
# -*- coding: utf8 -*-
print u'éééé'
Now another one called "test2.py" with:
import subprocess
subprocess.Popen('python test.py', stdout=subprocess.PIPE,
shell=True).stdout.read()
Now launch test2:
$ python test2.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
print u'éééé'
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-3: ordinal not in range(128)
I don't know about the internals of print, and I am not sure this is a
bug, so I'll put Marc-André in the loop. |
|
Date |
User |
Action |
Args |
2009-06-01 20:41:49 | tarek | set | recipients:
+ tarek, lemburg, srid |
2009-06-01 20:41:49 | tarek | set | messageid: <1243888909.28.0.00108155484758.issue6166@psf.upfronthosting.co.za> |
2009-06-01 20:41:48 | tarek | link | issue6166 messages |
2009-06-01 20:41:47 | tarek | create | |
|