Dieter Maurer wrote:
     "sys.setdefaultencoding" is only available at startup.
     Thus, setting "defaultencoding" must happen in a "sitecustomize"
     or "site" module.


Or if you're sufficiently devious, it's available any time (not that actually using it is a good idea, but...):

>>> import sys
>>> sys.setdefaultencoding
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'setdefaultencoding'
>>> del sys.modules['sys']
>>> import sys
>>> sys.setdefaultencoding
<built-in function setdefaultencoding>

--
Benji York
Senior Software Engineer
Zope Corporation
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to