Re: How does Python get the value for sys.stdin.encoding?

2010-08-12 Thread Anssi Saari
Benjamin Kaplan benjamin.kap...@case.edu writes: Sys.stdin and stdout are files, just like any other. There's nothing special about them at compile time. When the interpreter starts, it checks to see if they are ttys. If they are, then it tries to figure out the terminal's encoding based on

How does Python get the value for sys.stdin.encoding?

2010-08-11 Thread RG
I thought it was hard-coded into the Python executable at compile time, but that is apparently not the case: [...@mickey:~]$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type help, copyright, credits or license for more information.

Re: How does Python get the value for sys.stdin.encoding?

2010-08-11 Thread Benjamin Kaplan
On Wed, Aug 11, 2010 at 6:21 PM, RG rnospa...@flownet.com wrote: I thought it was hard-coded into the Python executable at compile time, but that is apparently not the case: [...@mickey:~]$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin

Re: How does Python get the value for sys.stdin.encoding?

2010-08-11 Thread RG
In article mailman.1988.1281579897.1673.python-l...@python.org, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Wed, Aug 11, 2010 at 6:21 PM, RG rnospa...@flownet.com wrote: I thought it was hard-coded into the Python executable at compile time, but that is apparently not the case: