Re: [Pyobjc-dev] depythonify_c_value rejects non-ascii, non-unicode strings
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2004-01-21 19:57:11
|
On 21 jan 2004, at 20:38, Marc-Antoine Parent wrote: >>> Too bad that sitecustomize.py cannot in the same directory as a >>> script (dirname(sys.argv[0] is added after site.py finishes). BTW. >>> does anyone know why sys.setdefaultencoding is removed in site.py? >>> E.g. why is it good that users cannot change the default encoding >>> after the interpreter has initialized? >> >> sys.setdefaultencoding is probably removed in site.py for the same >> reason you don't like global switches.. someone could >> sys.setdefaultencoding in a module that you use, for example. > > The fact that setdefaultencoding can only be set at startup is a major > limitation, and the reason that I argue for a separate value in the > bridge. > And the fact that setdefaultencoding exists and is removed early during startup is an important reason for not adding a simular function to PyObjC. If you really want to change the encoding after startup you should probably file a bugreport for Python, or ask around on comp.lang.python. BTW. If you build .app bundles you can completely replace the site.py inside your application Ronald |