Setting stdout encoding

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Sep 10 18:34:47 EDT 2007


En Mon, 10 Sep 2007 10:02:42 -0300, Fabio Zadrozny <fabiofz at gmail.com>  
escribi�:

>> Does someone know if there's a way to explicitly set the stdout/stderr/
>> stdin
>> encoding that python should use?
>>
>> The encoding can be set using the C API for file objects - from Python
>> code, use ctypes:
>>
>>
> Yeap, but that would leave me with the original problem: I need to run a
> script to run the original script I want to run...(and not being  
> compatible
> with other python implementations). Isn't there any way to set that
> externally (like environment variable, args to the interpreter or  
> anything
> else like that)?

You could place code like that on sitecustomize.py
I think this should be fixed on Eclipse/pydev. If they replace sys.stdout  
with a different object - they should make sure it has the right behavior.  
Same for IDLE if it's broken too.

-- 
Gabriel Genellina




More information about the Python-list mailing list