打开Eclipse,
1. Windows->Preferences->General->Editors->Text Editors->Spelling->Encoding,设置为UTF-8
2. Windows->Preferences->General->Workspace->Text file encoding,设置为UTF-8
3. Windows->Preferences->Pydev->Editors->Templates,将所有Context为New Module的Pattern都加上一句
# -*- coding: utf-8 -*-(注意,不是UTF-8,只能小写)
OK,现在新建一个Pydev Module试试 print u'你好,世界'。
本文指导如何在Eclipse中设置编码格式,并演示了新建Python模块打印中文字符的步骤。


13万+

被折叠的 条评论
为什么被折叠?



