summaryrefslogtreecommitdiff
path: root/docs/getting_started/echobot.rst
diff options
context:
space:
mode:
authorPaul Molodowitch <elrond79@gmail.com>2012-10-24 11:27:52 -0700
committerLance Stout <lancestout@gmail.com>2012-10-24 13:06:36 -0700
commit52feabbe7641f19a17810438d2469b2395b2819f (patch)
treea54ad92b80775233aafc05acdf27adf3942973df /docs/getting_started/echobot.rst
parenta22ca228cc3a121da8bad4268c39bff5190db969 (diff)
downloadslixmpp-52feabbe7641f19a17810438d2469b2395b2819f.tar.gz
slixmpp-52feabbe7641f19a17810438d2469b2395b2819f.tar.bz2
slixmpp-52feabbe7641f19a17810438d2469b2395b2819f.tar.xz
slixmpp-52feabbe7641f19a17810438d2469b2395b2819f.zip
added setdefaultencoding method so reload(sys) not needed
reload(sys) could cause problem in user code - ie, sys.stdout, excepthook, and displayhook would be reset, etc
Diffstat (limited to 'docs/getting_started/echobot.rst')
-rw-r--r--docs/getting_started/echobot.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/getting_started/echobot.rst b/docs/getting_started/echobot.rst
index 053a76f2..7d29ec58 100644
--- a/docs/getting_started/echobot.rst
+++ b/docs/getting_started/echobot.rst
@@ -69,8 +69,8 @@ use ASCII. We can get Python to use UTF-8 as the default encoding by including:
.. code-block:: python
if sys.version_info < (3, 0):
- reload(sys)
- sys.setdefaultencoding('utf8')
+ from sleekxmpp.util.misc_ops import setdefaultencoding
+ setdefaultencoding('utf8')
.. warning::