在Eclipse中执行Python代码时,如果有中文注释,提示:SyntaxError: Non-ASCII character ‘\xe7‘ in file D:\python\Test\hello\getjpg.py on line 13, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
解决办法:
在文件的第一行或者是第二行加上:# -*- coding: utf-8 -*-