[Zope-Coders] Re: [Zope-dev] Unicode treatment in 2.6b1

Guido van Rossum guido@python.org
Mon, 07 Oct 2002 08:18:04 -0400


> > >  - we check some command line switch (-E foo for instance) and if it is
> > >    set then we call sys.setdefaultencoding(foo),
> > >  - we import site.py to get original behavior.
> > 
> > You can't call sys.setdefaultencoding() except in a sitecustomize.py
> > module.
> 
> I assumed you couldn't call it before it had been deleted from the 'sys'
> module by site.py (as it's called in my Debian -- is it sitecustomize.py
> in some other places?). So the plan was to start python with -S to make
> it not read site.py, and then "import site".

Sorry, that wasn't clear from the context.  Read site.py and search
for sitecustomize -- it's a hook to add site specific changes to site.py.

> You're saying this won't work?

It will work.

--Guido van Rossum (home page: http://www.python.org/~guido/)