在用python抓取网页的时候突然出现了这样的一行字SyntaxError: Non-ASCII character '\xe8' in file D:\???\softwareDeveloper\python\workplace\MyFirstPy\loop.py on line 16, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details的错误,原来python在抓取网页时中文默认是ASCLL值显示的,不支持中文,需要在开头申明一下用# coding =encoding name 或者  # -*- coding:  -*- 就可以解决问题,下面的链接是原文地址

http://www.python.org/dev/peps/pep-0263/