|
To get a eclipse + PyDev high
The tragedy is that there are Chinese strings when Leng appear syntaxerror:non-ascii character this problem
All right, let's fix this annoying stuff.
Each code file is preceded by a #-*-coding:utf-8-*-or: # Coding=utf-8
PS: If you want to be lazy, don't want to add every new file to the top line.
You can-> Preferences->pydev->editor->templates in Windows
Select the <empty> on the right, click Edit, and then add the top line, which will automatically join the new
(You can also create a new one, but you have to choose the one you created instead of the default empty when you create the new module)
Re-compile ...
Finally without the wrong hint ...
But ...
Chinese can't output normally
Very good
and change Eclipse.
Window-> Preferences-> General-> Workspace, find "Text file Encoding", select Other, choose "UTF-8"
Ok
again to compile ...
Everything's fine.
Finish. |