reload(sys)

Sönmez Kartal rainwatching at gmail.com
Thu Aug 30 20:45:43 EDT 2007


Hello,

I've had an encoding issue and solved it by
"sys.setdefaultencoding('utf-8')"...

My first try wasn't successful since setdefaultencoding is not named
when I imported sys module. After, I import sys module, I needed to
write "reload(sys)" also.

I wonder why we need to call "reload(sys)" to get setdefaultencoding
named?

Happy coding




More information about the Python-list mailing list